deploy nkp airgapped with a private and secure registry (harbor) using ansible.
main tasks:
- create bootstrap VM
- generate ssl certs
- deploy and configure docker
- deploy and configure harbor
- deploy nkp
-
update the system
dnf update -y
-
install ansible
dnf install ansible-core -y
-
install ansible collections:
ansible-galaxy collection install community.general # --> community.general:10.5.0 was installed successfully ansible-galaxy collection install ansible.posix # --> ansible.posix:2.0.0 was installed successfully ansible-galaxy collection install nutanix.ncp # --> nutanix.ncp:2.1.1 was installed successfully
-
clone this repository:
git clone https://github.com/elyacoub9/nkp-airgapped-ansible.git cd nkp-airgapped-ansible -
edit the variables file with your env details:
a. fill the params in this file vars/all.yaml:
vim vars/all.yaml #yum install vim -yb. customize your management cluster resources (optional):
vim vars/custom_resources.yaml
if you don’t make any changes to the file, the cluster will use the default (recommended) config.
-
update hosts.ini and generate ssh keys:
HARBOR_IP=$(grep 'HARBOR_IP:' vars/all.yaml | awk '{print $2}' | tr -d '"') echo -e "[bootstrap]\n$HARBOR_IP" > inventory/hosts.ini
ssh-keygen -o -f /root/.ssh/id_rsa -N "" -q -
play
- add -v for more detailed output
ansible-playbook site.yaml
the default login for the bootstrap vm is root:root, which you should change.