Skip to content

Commit c127b60

Browse files
committed
Add instructions to set up deploy targets on the local stack
1 parent c50d5fa commit c127b60

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

docs/contributing-to-lagoon/developing-lagoon.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,40 @@ At the end of the process, the command will provide some useful information that
9696
!!! warning
9797
This can take some time to complete as it will install a lot of components necessary to make Lagoon work. This includes things like ingress-nginx, harbor, and all the additional services to make exploring Lagoon easy.
9898

99+
At this point, it is helpful to configure the Lagoon CLI to work with the local lagoon.
100+
First however, you must add your ssh public key to a user.
101+
If you set up a seed user in earlier steps, then you can use that one.
102+
Visit the user's settings page in the UI, most likely located at [https://lagoon-ui.${LAGOON_IP}.nip.io/settings](https://lagoon-ui.${LAGOON_IP}.nip.io/settings), where LAGOON_IP is the IP address of the k3d cluster.
103+
Next, you should install and configure the Lagoon CLI - the instructions for which are located [here](/installing-lagoon/lagoon-cli/).
104+
However, in this case the correct command can be found using `make k3d/get-lagoon-cli-details`, which will return something like:
105+
106+
```bash title="Add local-stack lagoon to Lagoon CLI"
107+
lagoon config add \
108+
--lagoon local-k3d \
109+
--graphql http://lagoon-api.${LAGOON_IP}.nip.io/graphql \
110+
--token TOKEN \
111+
--hostname lagoon-token.${LAGOON_SSH_IP}.nip.io \
112+
--port 2223
113+
```
114+
115+
In order for Lagoon to deploy a project, it needs a "deploy target" to be set.
116+
The organizations created via the `make k3d/seed-data` make target will already have this configured for you, but not organizations created via the `LAGOON_SEED_ORGANIZATION` environment variable.
117+
To add a deploy target to an organization, you will first need to get the ID of preconfigured Lagoon Remote with:
118+
119+
```bash
120+
lagoon list deploytargets
121+
```
122+
123+
It will most likely report an available deploy target with name `ci-local-control-k8s` and ID 2001.
124+
You must then add this deploy target as an _organizational_ deploy target as follows:
125+
126+
```
127+
lagoon add organization-deploytarget -O ORG_NAME -D DEPLOY_TARGET_ID
128+
```
129+
130+
Here `ORG_NAME` is the organization you wish to receive the target; `LAGOON_SEED_ORGANIZATION` if you wish to use the seeded organization.
131+
132+
99133
### Local development certificates
100134

101135
The local stack deploys with a locally generated CA certificate. This certificate is used by the local stack to provision certificates for services deployed in the local stack.

0 commit comments

Comments
 (0)