Remove direct docker CLI usage for STS agent example.
This commit is contained in:
1 parent
663609b1af
commit
03ab292a64
1 file changed
+2
-23
@@ -69,13 +69,7 @@ The certificate and key are not copied. The agent reads the files renewed by `va
|
|||||||
|
|
||||||
Role: **Server administrator**
|
Role: **Server administrator**
|
||||||
|
|
||||||
Load the names in the repository directory:
|
The agent container runs with the following settings:
|
||||||
|
|
||||||
```bash
|
|
||||||
source ./env.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
Run the agent container with the following settings:
|
|
||||||
|
|
||||||
| Setting | Value |
|
| Setting | Value |
|
||||||
|---|---|
|
|---|---|
|
||||||
@@ -87,22 +81,7 @@ Run the agent container with the following settings:
|
|||||||
| Locked memory limit | `64000000` bytes |
|
| Locked memory limit | `64000000` bytes |
|
||||||
| Arguments | `--project-id=${PROJECT_ID} --creds-file=/transfer_root/etc/sts-agent/cred.json --hostname=$(hostname) --agent-pool=${STS_AGENT_POOL}` |
|
| Arguments | `--project-id=${PROJECT_ID} --creds-file=/transfer_root/etc/sts-agent/cred.json --hostname=$(hostname) --agent-pool=${STS_AGENT_POOL}` |
|
||||||
|
|
||||||
With Docker:
|
`sts-agent/compose.yaml` holds these settings for Docker Compose. It reads `PROJECT_ID`, `STS_AGENT_POOL` and `HOSTNAME` from `sts-agent/.env`. Create the file with the values of `env.sh` and the host name printed by `hostname`:
|
||||||
|
|
||||||
```bash
|
|
||||||
sudo docker run --ulimit memlock=64000000 -d --rm \
|
|
||||||
-v /mnt/ext-storage:/mnt/ext-storage:ro \
|
|
||||||
-v /etc/sts-agent:/transfer_root/etc/sts-agent:ro \
|
|
||||||
-v /var/lib/vault-cert/wif:/transfer_root/var/lib/vault-cert/wif:ro \
|
|
||||||
--env GOOGLE_API_CERTIFICATE_CONFIG=/transfer_root/etc/sts-agent/certificate_config.json \
|
|
||||||
gcr.io/cloud-ingest/tsop-agent:latest \
|
|
||||||
--project-id="${PROJECT_ID}" \
|
|
||||||
--creds-file=/transfer_root/etc/sts-agent/cred.json \
|
|
||||||
--hostname="$(hostname)" \
|
|
||||||
--agent-pool="${STS_AGENT_POOL}"
|
|
||||||
```
|
|
||||||
|
|
||||||
With Docker Compose, `sts-agent/compose.yaml` holds the same settings. It reads `PROJECT_ID`, `STS_AGENT_POOL` and `HOSTNAME` from `sts-agent/.env`. Create the file with the values of `env.sh` and the host name printed by `hostname`:
|
|
||||||
|
|
||||||
`sts-agent/.env`:
|
`sts-agent/.env`:
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user