Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs #48

Merged
merged 3 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/explanation/workload.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Managing workload inside the charm
The core jenkins agent workload requires 3 main parameters (JENKINS_URL, JENKINS_AGENT and JENKINS_SECRET) and is defined as a 2-step process:
The core Jenkins agent workload requires 3 main parameters (JENKINS_URL, JENKINS_AGENT and JENKINS_SECRET) and is defined as a 2-step process:

1. Download the agent binary at JENKINS_URL/jnlpJars/agent.jar and store it in the agent’s home directory
2. Run the agent binary with the following parameters to register the node with Jenkins
Expand All @@ -19,4 +19,4 @@ Environment="JENKINS_URL=url"
Environment="JENKINS_AGENT=node-name"
```

The service won’t start automatically through the use of the `--no-start` option during packaging in order to allow flexibility between running the workload as a service and as a standalone executable, located at `/usr/bin/jenkins-agent`.
The service won’t start automatically through the use of the `--no-start` option during packaging in order to allow flexibility between running the workload as a service and as a standalone executable, located at `/usr/bin/jenkins-agent`.
4 changes: 2 additions & 2 deletions docs/how-to/configure-agent-node-label.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
### Configure `jenkins_agent_labels`

Use the `jenkins_agent_labels` configuration to allow assigning different labels to the agent's node on the jenkins server.
Comma-separated list of node labels. If empty, the agent's node will have the underlying machine's arch as a label by default, most of the time this will be `x86_64`. If this value is configured before any integrations with the jenkins charm is established, the label will be applied during the node's creation once an integration has been established.
The configuration is a comma-separated list of node labels. If empty, the agent's node will have the underlying machine's architecture as a label by default, for instance `x86_64`. If this value is configured before any integrations with the Jenkins charm are established, the label will be applied during the node's creation once an integration has been established.

```
juju config jenkins-agent jenkins_agent_labels=label1,label2,label3
```
```
31 changes: 18 additions & 13 deletions docs/tutorial/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ bootstrapping different clouds [here](https://juju.is/docs/olm/get-started-with-
Use `juju bootstrap localhost localhost` to bootstrap a `lxd` machine controller with the name
`localhost` for tutorial purposes.

### Setting up the tutorial model
### Set up the tutorial model

To easily clean up the resources and to separate your workload from the contents of this tutorial,
it is recommended to set up a new model with the following command.
To easily clean up the resources and to separate your workload from the contents of this tutorial,
set up a new model with the following command.

```
juju add-model tutorial
Expand All @@ -46,7 +46,7 @@ Use `juju bootstrap microk8s localhost-microk8s` to bootstrap a `microk8s` machi

Then, switch to your kubernetes controller add a model for the jenkins-k8s charm with the following command:
```
juju switch -c localhost-microk8s
juju switch localhost-microk8s
juju add-model jenkins-tutorial
```

Expand All @@ -55,15 +55,17 @@ Continue by deploying the jenkins-k8s charm. by default it will deploy the lates
juju deploy jenkins-k8s --channel=latest/edge
```

The Jenkins application can only have a single server unit. Adding more units through --num-units parameter will cause the application to misbehave.
> NOTE: The Jenkins application can only have a single server unit. Adding more units through the `--num-units` parameter will cause the application to misbehave.

#### Create an offer for Cross Model Integration

To integrate charms
[across different models](https://juju.is/docs/juju/manage-cross-model-integrations), a juju
[`offer`](https://juju.is/docs/juju/manage-cross-model-integrations#heading--create-an-offer) is
[across different models](https://juju.is/docs/juju/manage-cross-model-integrations), a Juju
[`offer`](https://juju.is/docs/juju/juju-offer) is
required.

> See more: [Create an offer](https://juju.is/docs/juju/manage-cross-model-integrations#heading--create-an-offer)

Create an offer of the `jenkins-k8s` charm's `agent` integration.

```
Expand All @@ -78,8 +80,11 @@ Application "jenkins-k8s" endpoints [agent] available at "admin/jenkins-tutorial

#### Integrate the Jenkins agent charm through the offer

Switch back to the k8s model where the `jenkins-agent` charm is deployed. An example of the switch
command looks like the following: `juju switch localhost:tutorial`.
Switch back to the k8s model where the `jenkins-agent` charm is deployed:

```
juju switch localhost:tutorial
```

Integrate the `jenkins-agent` charm to the `jenkins-k8s` server charm through the offer.
The syntax of the offer is as follows: `<controller>:<user>/<model>.<charm>`.
Expand All @@ -89,12 +94,12 @@ juju integrate jenkins-agent:agent localhost-microk8s:admin/jenkins-tutorial.jen
```


### Cleaning up the environment
### Clean up the environment

Congratulations! You have successfully finished the tutorial. You can now remove the
models that you’ve created using the following command.

```
juju destroy model localhost-microk8s:admin/jenkins-tutorial -y --release-storage
juju destroy model localhost:admin/tutorial -y --release-storage
```
juju destroy-model localhost-microk8s:admin/jenkins-tutorial --destroy-storage
juju destroy-model localhost:admin/tutorial --destroy-storage
```
Loading