Add agent bitbucket instructions

This commit is contained in:
Kevin McCarpenter™️
2022-03-17 17:12:52 -03:00
parent dc16da943d
commit d19ad1f7c1

View File

@@ -56,7 +56,7 @@ To complete the set-up of BitBucket with the agent we will need to define the pr
2. Remove the first and last line (header and footer) of the private key. 
1. First and last lines would be: `-----BEGIN PRIVATE KEY-----` and `-----END PRIVATE KEY-----`
3. Remove all newline and return characters and copy the contents of the file as a single-line string.
4. [Depending on how you run your Agent](./#run-the-agent-container), you will define the run-time variables `moderne.agent.bitbucket.private-key` with the single-line private key.
4. [Depending on how you run your Agent](./#run-the-agent-container), you will define the run-time variables `moderne.agent.bitbucket[0].private-key` with the single-line private key.
{% hint style="info" %}
**Using Bash or other shells?** 
@@ -65,3 +65,48 @@ Quickly get a single-line instance of your private key with the key header/foote
`cat bitbucket_privatekey.pcks8 | sed '1d;$d' | tr -d '\n'`
{% endhint %}
# Argument configuration
{% tabs %}
{% tab title="OCI Container" %}
The following arguments must be provided in addition to the arguments provided in ![on-premise agent](README.md). You can configure multiple bitbuckets by including multiple entries with different indices. The private key of each index must match up with the host for that index.
* `moderne_agent_bitbucket[{index}]_private-key` - Private key configured in previous step
* `moderne_agent_bitbucket[{index}]_host` - fully-qualified hostname of running bucketbucket instance. example: `bitbucket.org`
Example using Docker (note that host and private-key are fake):
```
docker run \
...
-e moderne_agent_bitbucket[0]_private-key=ABCDE \
-e moderne_agent_bitbucket[0]_host=bitbucket.myorg.com \
-e moderne_agent_bitbucket[1]_private-key=FGHIJ \
-e moderne_agent_bitbucket[1]_host=bitbucket2.myorg.com \
...
```
{% endtab %}
{% tab title="Executable JAR" %}
The following arguments must be provided in addition to the arguments provided in ![on-premise agent](README.md). You can configure multiple bitbuckets by including multiple entries with different indices. The private key of each index must match up with the host for that index.
* `moderne.agent.bitbucket[{index}].private-key` - Private key configured in previous step
* `moderne.agent.bitbucket[{index}].host` - fully-qualified hostname of running bucketbucket instance. example: `bitbucket.org`
Note: system properties can be used in place of arguments. As an example, use `-Dmoderne.agent.token={token_value}` as an argument instead of `--moderne.agent.token={token_value}` as an argument.
Example (note that host and private-key are fake):
```
java -jar moderne-agent-{version}.jar \
...
--moderne.agent.bitbucket[0].private-key=ABCDE \
--moderne.agent.bitbucket[0].host=bitbucket.myorg.com \
--moderne.agent.bitbucket[1].private-key=FGHIJ \
--moderne.agent.bitbucket[1].host=bitbucket2.myorg.com \
...
```
{% endtab %}
{% endtabs %}