/ansible-proxmox-salt

Setup for provisoning proxmox with linux images and setting up a saltmaster

Primary LanguageShell

Ansible playbook setup promox

This ansible collection of playbooks will help you setup a salt master. This requires you have a Proxmox server up and running.

To disable swap

sudo salt "*" cmd.run "sudo sed -i '/ swap / s/^/#/' /etc/fstab"

Proxmox

More on proxmox here: proxmox Download proxmox iso

Before you start

  1. See in inventory/server in this code base before starting anything. This needs the ip address and username to the server before it can provision the kvm-server.
  2. Log onto your system and add a ansible user, this user should also be in the sudo group *.. sudo useradd -G sudo -m ansible *.. on centos usermod -aG wheel ansible *.. This user also need the controllers /home/vagrant/.ssh/id_rsa.pub key in the authorized_keys file under /home/ansible/.ssh/authorized_keys on the kvm server.

How to start

  1. Run "vagrant up" inside the root foler
  2. Run "vagrant ssh"
  3. Run "cd /vagrant"
  4. Make sure your copy the generated public key in /home/vagrant/.ssh/id_rsa.pub to your a users home folder in the authorized_keys file
  5. Then run "ansible-playbook create_server.yml --ask-sudo-pass"

#salt-cloud

  1. sudo salt-cloud -F proxmox-provider list_nodes
  2. sudo salt-cloud -p proxmox-ubuntu-16.04_micro minion1 -l debug

Setup salt master

  1. ansible-playbook create_salt_master.yml --ask-sudo-pass

TODO:

apt install nfs-common start rcpbind service nfs-common service restart restart kubelet service rancher/rancher#4423 https://github.com/kubernetes/examples/tree/master/staging/volumes/nfs/nfs-data https://docs.openshift.org/latest/install_config/persistent_storage/persistent_storage_nfs.html