Skip to content

Setup

Setup and first deploy (multipass)

!!!Warning: Multipass networking doesn't work (no external connectivity, though name resolution works) with Cisco AnyConnect running! Turning off Cisco AnyConnect and the networking works - you cannot start Cisco AnyConnect while multipass is running or the network will be killed.

Todo

This section is under construction - need to split into sections covering install, creating BOM and then deploying BOM instead of single set of steps

Create or change into the directory containing your BOM then run the following commands:

  1. install multipass :
brew install --cask multipass
  1. download the cloud init file :
curl https://raw.githubusercontent.com/cloud-native-toolkit/sre-utilities/main/cloud-init/cli-tools.yaml --output cli-tools.yaml
  1. launch multipass vm :
multipass launch --name cli-tools --cloud-init ./cli-tools.yaml
  1. mount current directory into VM : `
multipass mount $PWD cli-tools:/automation
  1. enter vm :
multipass shell cli-tools
  1. install iascable :
curl -sL https://raw.githubusercontent.com/cloud-native-toolkit/iascable/main/install.sh | sudo bash
  • this is different to the command given in the docs (pipe into bash not sh)

  • create BOM e.g. my-ibm-vpc-gitops.yaml

apiVersion: cloudnativetoolkit.dev/v1alpha1
kind: BillOfMaterial
metadata:
  name: my-ibm-vpc-gitops
spec:
  modules:
    - name: ibm-vpc
    - name: ibm-vpc-subnets
    - name: ibm-vpc-gateways
    - name: ibm-ocp-vpc
      variables:
        - name: worker_count
          value: 1
    - name: gitops-repo
    - name: argocd-bootstrap
  1. run iascable build:
iascable build -i oc-dev.yaml
  1. run the terraform apply (optionally a variables.yaml file can be created - if not you will be prompted for required values) :
cd output/my-ibm-vpc-gitops
./apply.sh
  1. answer any prompts for missing variable values, check the steps listed and confirm the actions by responding yes
  2. wait for terraform and gitops to complete the install

Issues:

  • guidance on variable values to be provided is needed
  • certain modules fail (sealed-secrets-controller image fails to pull from docker.io - timeout)

Setup and first deploy (podman)

Create or change into the directory containing your BOM then run the following commands:

  1. install podman :
brew install podman
  1. install iascable if not already installed :
curl -sL https://raw.githubusercontent.com/cloud-native-toolkit/iascable/main/install.sh | sudo sh
  1. initialise podman :
podman machine init --rootful

you can also give the podman vm more resource if your machine has sufficient resource:

podman machine init --cpus 4 --memory 8096 --rootful
  1. start podman machine :
podman machine start
  1. create BOM e.g. my-ibm-vpc-gitops.yaml
apiVersion: cloudnativetoolkit.dev/v1alpha1
kind: BillOfMaterial
metadata:
  name: my-ibm-vpc-gitops
spec:
  modules:
    - name: ibm-vpc
    - name: ibm-vpc-subnets
    - name: ibm-vpc-gateways
    - name: ibm-ocp-vpc
      variables:
        - name: worker_count
          value: 1
    - name: gitops-repo
    - name: argocd-bootstrap
  1. run iascable build:
iascable build -i my-ibm-vpc-gitops.yaml
  1. launch the tools container :
cd output 
./launch.sh podman --pull
  1. copy the mounted directory to a container directory (needed as podman has issues with symbolic links on a mounted directory) :
cp -R * /workspaces
  1. run the terraform apply (optionally a variables.yaml file can be created - if not you will be prompted for required values) :

    cd /workspaces/my-ibm-vpc-gitops
    ./apply.sh
    
  2. answer any prompts for missing variable values, check the steps listed and confirm the actions by responding yes

  3. wait for terraform and gitops to complete the install

Note

the launch script will attach a podman volume for the workspace filesystem, which persists across multiple container runs, so you may need to clear the workspaces directory if you don't need the content from previous runs.

Setup and first deploy (Docker)

Docker desktop should be installed and be running.

  1. create BOM e.g. my-ibm-vpc-gitops.yaml
apiVersion: cloudnativetoolkit.dev/v1alpha1
kind: BillOfMaterial
metadata:
  name: my-ibm-vpc-gitops
spec:
  modules:
    - name: ibm-vpc
    - name: ibm-vpc-subnets
    - name: ibm-vpc-gateways
    - name: ibm-ocp-vpc
      variables:
        - name: worker_count
          value: 1
    - name: gitops-repo
    - name: argocd-bootstrap
  1. run iascable build:
iascable build -i my-ibm-vpc-gitops.yaml
  1. launch the tools container :
cd output 
./launch.sh docker --pull
  1. copy the mounted directory to a container directory :
cp -R * /workspaces
  1. run the terraform apply (optionally a variables.yaml file can be created - if not you will be prompted for required values) :
cd /workspaces/my-ibm-vpc-gitops
./apply.sh
  1. answer any prompts for missing variable values, check the steps listed and confirm the actions by responding yes
  2. wait for terraform and gitops to complete the install