HydraPipeline

HydraOrganization

Organization registry managing customers and agencies in the Hydra platform.

Infrastructure

Server hydraorganization.experiencenet.com (46.225.184.72)
hcloud hydraexperiencenet context, cx23 nbg1
Config /root/.hydraorganization/config.yaml
Data /root/.hydraorganization/
Service systemctl status hydraorganization
Logs journalctl -u hydraorganization -f
Health GET /api/v1/health

Operations

Check status

ssh root@46.225.184.72 systemctl status hydraorganization

Or via the health endpoint:

curl -s https://hydraorganization.experiencenet.com/api/v1/health

View logs

ssh root@46.225.184.72 journalctl -u hydraorganization -f

Show last 100 lines:

ssh root@46.225.184.72 journalctl -u hydraorganization -n 100 --no-pager

Restart

ssh root@46.225.184.72 systemctl restart hydraorganization

Update

Updates happen automatically. The service polls releases.experiencenet.com for new versions and applies them. To check the current version:

ssh root@46.225.184.72 hydraorganization version

Never manually deploy -- always use the release pipeline (tag + push to trigger CI, release server distributes, service auto-updates).

Create organization (API)

curl -X POST https://hydraorganization.experiencenet.com/api/v1/organizations \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Example Organization",
    "type": "customer",
    "contact_email": "contact@example.com"
  }'

The type field accepts customer or agency.

List organizations (API)

curl -s https://hydraorganization.experiencenet.com/api/v1/organizations \
  -H "Authorization: Bearer <token>" | jq .

Delete organization (API)

curl -X DELETE https://hydraorganization.experiencenet.com/api/v1/organizations/<id> \
  -H "Authorization: Bearer <token>"

Key Concepts

Troubleshooting

YAML corruption

If the YAML store becomes corrupted (partial writes, disk issues):

  1. Stop the service: systemctl stop hydraorganization
  2. Check the data directory: ls -la /root/.hydraorganization/
  3. Look for malformed YAML files: python3 -c "import yaml; yaml.safe_load(open('/root/.hydraorganization/index.yaml'))" or manually inspect with cat
  4. Restore from backup if needed, or manually fix the YAML syntax
  5. Start the service: systemctl start hydraorganization

Service won't start

  1. Check logs for the error: journalctl -u hydraorganization -n 50 --no-pager
  2. Verify config exists and is valid: cat /root/.hydraorganization/config.yaml
  3. Check if the port is already in use: ss -tlnp | grep <port>
  4. Verify the binary exists and is executable: ls -la $(which hydraorganization)
  5. Try running manually to see output: hydraorganization serve

Auth token issues

  1. Verify the token by calling hydraauth directly: curl -s https://hydraauth.experiencenet.com/api/v1/verify -H "Authorization: Bearer <token>"
  2. Check that hydraauth is reachable from the organization server: ssh root@46.225.184.72 curl -s https://hydraauth.experiencenet.com/api/v1/health
  3. If tokens are consistently rejected, check clock sync: ssh root@46.225.184.72 date -- token validation may fail if the server clock is skewed