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 bootstrap docs to match v0.2 #403

Merged
merged 1 commit into from
Oct 30, 2020
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
13 changes: 7 additions & 6 deletions docs/get-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ flux bootstrap github \

Example output:

```text
```console
$ flux bootstrap github --owner=gitopsrun --repository=fleet-infra --path=staging-cluster --team=devs
► connecting to github.com
✔ repository created
Expand All @@ -122,6 +122,7 @@ $ flux bootstrap github --owner=gitopsrun --repository=fleet-infra --path=stagin
► installing components in flux-system namespace
deployment "source-controller" successfully rolled out
deployment "kustomize-controller" successfully rolled out
deployment "helm-controller" successfully rolled out
deployment "notification-controller" successfully rolled out
✔ install completed
► configuring deploy key
Expand Down Expand Up @@ -213,11 +214,11 @@ In about 30s the synchronization should start:

```console
$ watch flux get kustomizations
NAME REVISION SUSPENDED READY MESSAGE
flux-system main/6eea299fe9997c8561b826b67950afaf9a476cf8 False True Applied revision: main/6eea299fe9997c8561b826b67950afaf9a476cf8
webapp-backend False False dependency 'flux-system/webapp-common' is not ready
webapp-common master/7411da595c25183daba255068814b83843fe3395 False True Applied revision: master/7411da595c25183daba255068814b83843fe3395
webapp-frontend False False dependency 'flux-system/webapp-backend' is not ready
NAME READY MESSAGE
flux-system True Applied revision: main/6eea299fe9997c8561b826b67950afaf9a476cf8
webapp-backend False dependency 'flux-system/webapp-common' is not ready
webapp-common True Applied revision: master/7411da595c25183daba255068814b83843fe3395
webapp-frontend False dependency 'flux-system/webapp-backend' is not ready
```

When the synchronization finishes you can check that the webapp services are running:
Expand Down
38 changes: 20 additions & 18 deletions docs/guides/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ flux bootstrap <GIT-PROVIDER> \
and `--arch=arm64` for ARMv8 64-bit container images.

If you wish to install a specific version, use the Flux
[release tag](https://github.com/fluxcd/flux2/releases) e.g. `--version=v0.0.14`.
[release tag](https://github.com/fluxcd/flux2/releases) e.g. `--version=v0.2.0`.

With `--path` you can configure the directory which will be used to reconcile the target cluster.
To control multiple clusters from the same Git repository, you have to set a unique path per
Expand All @@ -76,9 +76,9 @@ cluster e.g. `staging-cluster` and `production-cluster`:
```sh
├── staging-cluster # <- path=staging-cluster
│   └── flux-system # <- namespace dir generated by bootstrap
│   ├── toolkit-components.yaml
│   ├── toolkit-kustomization.yaml
│   └── toolkit-source.yaml
│   ├── gotk-components.yaml
│   ├── gotk-sync.yaml
│   └── kustomization.yaml
└── production-cluster # <- path=production-cluster
└── flux-system
```
Expand Down Expand Up @@ -213,16 +213,16 @@ Generate the Flux manifests with:
```sh
flux install --version=latest \
--arch=amd64 \ # on ARM64/AARCH64 clusters use --arch=arm64
--export > ./my-cluster/flux-system/toolkit-components.yaml
--export > ./my-cluster/flux-system/gotk-components.yaml
```

If your cluster must pull images from a private container registry, first you should pull
the toolkit images from GitHub Container Registry and push them to your registry, for example:

```sh
docker pull ghcr.io/fluxcd/source-controller:v0.0.14
docker tag ghcr.io/fluxcd/source-controller:v0.0.14 registry.internal/fluxcd/source-controller:v0.0.14
docker push registry.internal/fluxcd/source-controller:v0.0.14
docker pull ghcr.io/fluxcd/source-controller:v0.2.0
docker tag ghcr.io/fluxcd/source-controller:v0.2.0 registry.internal/fluxcd/source-controller:v0.2.0
docker push registry.internal/fluxcd/source-controller:v0.2.0
```

Create the pull secret in the `flux-system` namespace:
Expand All @@ -241,19 +241,19 @@ Set your registry domain, and the pull secret when generating the manifests:
flux install --version=latest \
--registry=registry.internal/fluxcd \
--image-pull-secret=regcred \
--export > ./my-cluster/flux-system/toolkit-components.yaml
--export > ./my-cluster/flux-system/gotk-components.yaml
```

Commit and push the manifest to the master branch:

```sh
git add -A && git commit -m "add toolkit manifests" && git push
git add -A && git commit -m "add components" && git push
```

Apply the manifests on your cluster:

```sh
kubectl apply -f ./my-cluster/flux-system/toolkit-components.yaml
kubectl apply -f ./my-cluster/flux-system/gotk-components.yaml
```

Verify that the controllers have started:
Expand Down Expand Up @@ -297,25 +297,27 @@ flux create kustomization flux-system \
--interval=10m
```

Export both objects, commit and push the manifests to Git:
Export both objects, generate a `kustomization.yaml`, commit and push the manifests to Git:

```sh
flux export source git flux-system \
> ./my-cluster/flux-system/toolkit-source.yaml
> ./my-cluster/flux-system/gotk-sync.yaml

flux export kustomization flux-system \
> ./my-cluster/flux-system/toolkit-kustomization.yaml
>> ./my-cluster/flux-system/gotk-sync.yaml

git add -A && git commit -m "add toolkit reconciliation" && git push
cd ./my-cluster/flux-system && kustomize create --autodetect

git add -A && git commit -m "add sync manifests" && git push
```

To upgrade the toolkit to a newer version, run the install command and commit the changes:
To upgrade the Flux components to a newer version, run the install command and commit the changes:

```sh
flux install --version=latest \
--export > ./my-cluster/flux-system/toolkit-components.yaml
--export > ./my-cluster/flux-system/gotk-components.yaml

git add -A && git commit -m "update toolkit" && git push
git add -A && git commit -m "update flux" && git push
```

The source-controller will pull the changes on the cluster, then the kustomize-controller
Expand Down