Commit a9f5b3c5 authored by Thong Kuah's avatar Thong Kuah

Merge branch 'ash2k/fix-docs' into 'master'

Fix gitlab-kas local dev docs

See merge request gitlab-org/gitlab!49327
parents d53fc7f5 c4940a45
...@@ -9,45 +9,45 @@ info: To determine the technical writer assigned to the Stage/Group associated w ...@@ -9,45 +9,45 @@ info: To determine the technical writer assigned to the Stage/Group associated w
You can run `kas` and `agentk` locally to test the [Kubernetes Agent](index.md) yourself. You can run `kas` and `agentk` locally to test the [Kubernetes Agent](index.md) yourself.
1. Create a `cfg.yaml` file from the contents of 1. Create a `cfg.yaml` file from the contents of
[`kas_config_example.yaml`](https://gitlab.com/gitlab-org/cluster-integration/gitlab-agent/-/blob/master/doc/kas_config_example.yaml), or this example: [`config_example.yaml`](https://gitlab.com/gitlab-org/cluster-integration/gitlab-agent/-/blob/master/pkg/kascfg/config_example.yaml), or this example:
```yaml ```yaml
listen_agent: agent:
network: tcp listen:
address: 127.0.0.1:8150 network: tcp
websocket: false address: 127.0.0.1:8150
gitlab: websocket: false
address: http://localhost:3000 gitops:
authentication_secret_file: /Users/tkuah/code/ee-gdk/gitlab/.gitlab_kas_secret poll_period: "10s"
agent: gitlab:
gitops: address: http://localhost:3000
poll_period: "10s" authentication_secret_file: /Users/tkuah/code/ee-gdk/gitlab/.gitlab_kas_secret
``` ```
1. Create a `token.txt`. This is the token for 1. Create a `token.txt`. This is the token for
[the agent you created](../../user/clusters/agent/index.md#create-an-agent-record-in-gitlab). This file must not contain a newline character. You can create the file with this command: [the agent you created](../../user/clusters/agent/index.md#create-an-agent-record-in-gitlab). This file must not contain a newline character. You can create the file with this command:
```shell ```shell
echo -n "<TOKEN>" > token.txt echo -n "<TOKEN>" > token.txt
``` ```
1. Start the binaries with the following commands: 1. Start the binaries with the following commands:
```shell ```shell
# Need GitLab to start # Need GitLab to start
gdk start gdk start
# Stop GDK's version of kas # Stop GDK's version of kas
gdk stop gitlab-k8s-agent gdk stop gitlab-k8s-agent
# Start kas # Start kas
bazel run //cmd/kas -- --configuration-file="$(pwd)/cfg.yaml" bazel run //cmd/kas -- --configuration-file="$(pwd)/cfg.yaml"
``` ```
1. In a new terminal window, run this command to start agentk: 1. In a new terminal window, run this command to start agentk:
```shell ```shell
bazel run //cmd/agentk -- --kas-address=grpc://127.0.0.1:8150 --token-file="$(pwd)/token.txt" bazel run //cmd/agentk -- --kas-address=grpc://127.0.0.1:8150 --token-file="$(pwd)/token.txt"
``` ```
You can also inspect the You can also inspect the
[Makefile](https://gitlab.com/gitlab-org/cluster-integration/gitlab-agent/-/blob/master/Makefile) [Makefile](https://gitlab.com/gitlab-org/cluster-integration/gitlab-agent/-/blob/master/Makefile)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment