This repository is used to manage the OpenShift Virtualization GitOps Deployments in a Gitops Manner.
- RHEL 8.x tested on RHEL 8.6
Using Shell Script
curl -OL https://raw.githubusercontent.com/tosin2013/openshift-virtualization-gitops/main/scripts/install.sh
chmod +x install.sh
./install.sh
Using Ansible
This is useful when you want to use Ansible to install OpenShift Virtualization GitOps. Against remote machines.
sudo ansible-galaxy install --force -r roles/requirements.yml
sudo ansible-galaxy collection install --force -r collections/requirements.yml
ansible-playbook -i inventories/production/hosts configure-host.yml --extra-vars "rhsm_activationkey=keyname rhsm_org_id=orgid"
export CONFIGURE_GITEA=true
./scripts/configure_gitea.sh
$ cat ~/gitea-password.txt
Commit local openshit virtualization repo to the Git Repo
$ git remote remove origin
$ git remote add origin http://yourip:3000/svc-gitea/openshift-virtualization-gitops.git
$ git push --set-upstream origin main
cp avi inventories/dev inventories/r640
Make changes to repo and push to git repo
To test the Fetchit, run the following command as root:
sudo su - root
./scripts/configure-fetchit.sh
Optional: Advanced Deployment
See Qubinode GitOps Deployment for more details.
sudo su - admin
git clone https://github.com/tosin2013/qubinode-installer.git
sudo su - root
systemctl enable podman.socket --now
mkdir -p /opt/fetchit
mkdir -p ~/.fetchit
# Change Git URL to your Git Repo
GITURL="http://yourrepo:3000/tosin/openshift-virtualization-gitops.git"
cat >/root/.fetchit/config.yaml<<EOF
targetConfigs:
- url: ${GITURL}
username: svc-gitea
password: password
filetransfer:
- name: copy-vars
targetPath: inventories/virtual-lab/host_vars
destinationDirectory: /home/admin/qubinode-installer/playbooks/vars
schedule: "*/1 * * * *"
branch: main
EOF
cp /home/admin/openshift-virtualization-gitops/scripts/fetchit/fetchit-root.service /etc/systemd/system/fetchit.service
systemctl enable fetchit --now
podman ps
exit
cd openshift-virtualization-gitops
python3 scripts/setup.py
go to http://localhost:8081/ or http://ipaddress:8081/ui/
cd openshift-4-deployment-notes/assisted-installer/
CLUSTER_SIZE=sno # sno, converged, full
cp $HOME/openshift-virtualization-gitops/example/${CLUSTER_SIZE}-cluster-vars.sh cluster-vars.sh
- Get offline token and save it to
~/rh-api-offline-token
vim ~/rh-api-offline-token
- Get OpenShift Pull Secret and save it to
~/ocp-pull-secret
vim ~/ocp-pull-secret
- Run the bootstrap script to create the cluster, configure it, and download the ISO
the bootstrap-create.sh script may also be used.
./bootstrap.sh
./hack/create-kvm-vms.sh # Change the CPU and Memory to match your requirements then run this script
./bootstrap-install.sh # you may have to login to console.redhat.com and hit install
./hack/watch-and-reboot-kvm-vms.sh
./bootstrap-post-install.sh
- If you are having issues logging on to gitea from the user stop and start the podman container.