Skip to content

Environment Setup

At the end of this chapter you will have,

  • Two minikube clusters mgmt and cluster1

  • mgmt cluster will have Argocd and Gitea git repository manager

  • cluster1 will have Tektoncd, Gloo Edge and Portal deployed

Ensure Python venv

To create the virtual environment run the following command,

direnv allow .

The command will instal all the required python modules in the $DEMO_HOME/.direnv.

Install the ansible roles and collections that will be used by the playbooks,

make install-roles-and-collections

Setup Kubernetes Environment

With Ansible environment ready we are all good to setup demo environment with required components installed.

Copy the $DEMO_HOME/vars.yml to $DEMO_HOME/vars.local.yml and edit the values to suit your environment.

Minikube clusters

The minikube clusters could be created by running:

make create-kube-clusters

Important

The order of the deployment in the following section is crucial as Argocd and Pipelines is dependent on the gitea deployment and its details.

Deploy Gitea

The Gitea git repository manager could by deployed by running:

make deploy-gitea

Note

It will take few minutes for Gitea to be installed

The Gitea details are stored in the file $DEMO_WORK_DIR/gitea-details.yaml.

Deploy Argocd

The Argocd could by deployed by:

make deploy-argocd

The Argocd details are stored in the file $DEMO_WORK_DIR/argocd-details.yaml.

Deploy Gloo Edge and Portal

The Gloo Edge enterprise and portal could be deployed via,

make deploy-gloo

Deploy Tektoncd

The Tektoncd could by deployed by:

make deploy-pipelines

Extras

To make the demo builds faster we will use sonatype nexus repository manager, it be deployed by,

make deploy-extras

The installation apart from installing the components, it will also download the companion tools such as tkn, gitea, glooctl, kubectl etc., on to $DEMO_HOME/bin.

Demo Sources

Fruits API GitOps

Clone the fruits-api-gitops demo sources from the GitHub repository,

cd ..
git clone https://github.com/kameshsampath/fruits-api-gitops

For convenience, we will refer the clone demo sources folder as $DEMO_HOME,

export DEMO_HOME="$PWD"

Add the git dev remote to Gitea,

export FRUITS_API_GITOPS_REPO_URL="$GITEA_URL/gitea/fruits-api-gitops.git"
git remote add dev $FRUITS_API_GITOPS_REPO_URL

Commit and push the local code to the dev remote,

git commit -a -m "Demo Setup"
git push dev main

Fruits API

Clone the fruits-api demo sources,

cd ..
git clone https://github.com/kameshsampath/fruits-api
cd fruits-api

Add Gitea repo as dev remote,

export FRUITS_API_REPO_URL="$GITEA_URL/gitea/fruits-api.git"
git remote add dev $FRUITS_API_REPO_URL

Navigate to the gitops sources,

cd $DEMO_HOME