BEFORE YOU START
Make sure the following software is installed before continuing with these instructions:
gitops>= 0.5.0-rc2. Use
gitops versionto check the currently installed version. If needed, download a newer version of Weave GitOps from the releases page.
GITHUB_TOKEN should be set as an environment variable in the current shell. It should have permissions to create Pull Requests against the cluster config repo.
Upgrading requires we:
- Have a cluster with Weave GitOps installed
- Install a CAPI provider
- Apply the entitlements secret
- Check that Weave GitOps Enterprise has been installed
- Connect the management cluster up to itself
gitops on a new cluster#
kind here as an example.
extraMountsare for the Docker CAPI provider (CAPD)
extraPortMappingsare for easily accessing NATS and the UI
kind: ClusterapiVersion: kind.x-k8s.io/v1alpha4nodes: - role: control-plane extraMounts: - hostPath: /var/run/docker.sock containerPath: /var/run/docker.sock extraPortMappings: - containerPort: 30080 hostPort: 30080 listenAddress: "0.0.0.0" # Optional, defaults to "0.0.0.0" protocol: tcp # Optional, defaults to tcp - containerPort: 31490 hostPort: 31490 listenAddress: "0.0.0.0" # Optional, defaults to "0.0.0.0" protocol: tcp # Optional, defaults to tcp
Fire up cluster
kind create cluster --config kind-config.yaml
Create a new repo
gh repo create my-management-cluster --private --confirmcd my-management-clusterecho "# my-management-cluster" > README.mdgit add README.mdgit commit --all --message "init commit"git push -u origin main
Install Weave Gitops
gitops install --app-config-url https://github.com/my-org/my-repo
The example templates provided in this guide have been tested with
1.0.1. However you might need to use an older or newer version depending on the capi-providers you plan on using.
Download a specific version of clusterctl from the releases page.
In order to be able to provision Kubernetes clusters, a CAPI provider needs to be installed.
clusterctl init --infrastructure docker
Contact firstname.lastname@example.org for a valid entitlements secret. Then apply it to the cluster:
kubectl apply -f entitlements.yaml
Run the upgrade command specifying the same
--app-config-repo used in install and the desired version of Weave GitOps Enterprise.
gitops upgrade --app-config-url https://github.com/my-org/my-repo --version 0.0.16
You may need to add the
--base flag to the above command to indicate your local branch name, if it is not set to
A Pull Request will be created against your cluster repository. Review and merge this pull request to upgrade to Weave GitOps Enterprise.
You should now be able to load the WGE UI:
kubectl port-forward --namespace wego-system deployments.apps/weave-gitops-enterprise-nginx-ingress-controller 8000:80
The WGE UI should now be accessible at http://localhost:8000.
Connecting a cluster installs the agent which is responsible for detecting new clusters and reporting their status to the UI. We need to install the agent on our newly created management cluster. Check out How to: Connect a cluster. The agent should be loaded onto our new management cluster, give it a name like Management and leave the Ingress URL blank.
Head over to Getting started to create your first CAPI Cluster.