#cloud-config users: - name: agent gecos: Policy Engine Agent primary_group: agent groups: [users] shell: /bin/bash sudo: "ALL=(ALL) NOPASSWD:ALL" lock_passwd: true no_user_group: false write_files: - path: /etc/systemd/system/fedproxy-client.service owner: root:root permissions: '0644' content: | [Unit] Description=FedProxy Client Service After=network-online.target Wants=network-online.target [Service] Type=simple User=root WorkingDirectory=/root Environment="SERVICE=${serviceName}" Environment="PORT=8080" Environment="ATPRP_URL=https://rp.fedproxy.com" Environment="AUTH_PLUGIN=oidc" Environment="MARKET_ACCEPT_JSON_PATH=/root/secrets/publicdomainrelay.com/market/accept.json" ExecStart=/usr/local/bin/fedproxy-client Restart=always RestartSec=5 TimeoutStopSec=10 StandardOutput=journal StandardError=journal [Install] WantedBy=multi-user.target - path: /etc/systemd/system/policy-engine.service owner: root:root permissions: '0644' content: | [Unit] Description=Policy Engine Service After=network-online.target Wants=network-online.target [Service] Type=simple User=agent Group=agent WorkingDirectory=/home/agent ExecStart=/usr/local/bin/policy_engine api --bind 127.0.0.1:8080 Restart=always RestartSec=5 TimeoutStopSec=10 StandardOutput=journal StandardError=journal [Install] WantedBy=multi-user.target runcmd: - | set -x curl -sfL 'https://github.com/publicdomainrelay/sshai/releases/download/latest/policy_engine_0.0.1-next_linux_amd64.tar.gz' | tar -xvz -C /usr/local/bin curl -sfL 'https://github.com/publicdomainrelay/atproto-reverse-proxy/releases/download/latest/atproto-reverse-proxy_linux_amd64.tar.gz' | tar -xvz -C /usr/local/bin systemctl daemon-reload systemctl enable --now policy-engine.service systemctl enable --now fedproxy-client.service