Skip to content
This repository has been archived by the owner on Aug 19, 2021. It is now read-only.

VMware ESXi

mawinkler edited this page Nov 12, 2019 · 6 revisions

We're now configuring the environment for VMware ESXi.

File: vars/environment_esx_vars.yml.sample

Next, we create our vars file for VMware ESXi.

$ cp vars/environment_esx_vars.yml.sample \
    vars/environment_esx_vars.yml

File: vars/environment_esx_vars.yml

Same as above, but the ESXi environment currently only supports the deployment of k8s and k8s deployments at the time of writing. So, please activate components about kubernetes only.

# #####################################################################
# Site Deploy Components
# #####################################################################
site_deploy_kubernetes: yes
site_deploy_smartcheck: yes
site_deploy_jenkins: yes
site_deploy_gitlab: no
site_deploy_linkerd: yes
site_deploy_registry: yes

# #####################################################################
# Site Deploy Components - Leave these to no
# #####################################################################
site_deploy_jumphost: no
site_deploy_deepsecurity: no
site_deploy_gitlab_docker: no
site_deploy_endpoints: no

Additionally, to the Kubernetes settings above, for esx we need to specify the dns names of our virtual machines

# #####################################################################
# Kubernetes Settings
# #####################################################################
…
kubernetes_master_instance_name: vk8smaster
kubernetes_worker_instance_name: vk8sworker

Please note the missing number after vk8sworker, we will append that while looping through the number of worker nodes.

File: ./hosts

Since we don’t have a dynamic inventory for our little ESXi environment, we need to specify a hosts file as shown below:

[tag_role_k8smaster]
vk8smaster ansible_ssh_host=192.168.1.160

[tag_role_k8sworker]
vk8sworker1 ansible_ssh_host=192.168.1.161
vk8sworker2 ansible_ssh_host=192.168.1.162
vk8sworker3 ansible_ssh_host=192.168.1.163

Don’t change the tags within the brackets, simply adapt the dns names and ip addresses to your respective environment.

File: vars/environment_esx_secrets.yml.sample

Next, we create our secrets file for VMware ESXi and encrypt it with our password file.

$ cp vars/environment_esx_secrets.yml.sample \
    vars/environment_esx_secrets.yml
$ ansible-vault encrypt --vault-password-file \
    ../.vault-pass.txt vars/environment_esx_secrets.yml

File: vars/environment_esx_secrets.yml

$ ansible-vault edit --vault-password-file \
    ../.vault-pass.txt vars/environment_esx_secrets.yml

Specify the username / password combination for your servers on ESXi as described above.

---
kubernetes_master_login_user: <username>
kubernetes_master_login_password: <password>

kubernetes_worker_login_user: <username>
kubernetes_worker_login_password: <password>

Next Step

Clone this wiki locally