linux:cloud-init:project_clonewars
Table of Contents
[SCRIPT] Project CloneWars.sh
Documentation | |
---|---|
Name: | [SCRIPT] Project CloneWars.sh |
Description: | the way to deploy a war |
Modification date : | 18/10/2018 |
Owner: | dodger@ciberterminal.net |
Notify changes to: | backOps tuxe's |
Tags: | cloud-init |
Description
Project CloneWars borns on the necessity of a fast way to deploy VM's and make them available to SaltStack.
This project is “just” the whole manual deploy in a big-red-button-mode script.
So the script is able of:
- Connect the CVM
- Fully customize a new cloud-init.yaml template, that is:
- Add the ip address
- Add a pre-set of packages
- Add bofher user
- Upgrade the system
- Connect with salt-master
- Ask (if not forced) before droping a previously existing VM.
- Create the new VM in ANY nutanix cluster (actually: nuclu, nuvcc, datacenter_01)
- Auto-identify the network name (if it fails to identify, will exits)
- Auto-select the nutanix container (very simple)
- Optionally:
- Change RAM
- Add another disk
- Change cores
- Change cpu's
Help on the script
From salt-master:
avmlm-salt-001 /home/bofher/scripts/CloneWars # bash CloneWars.sh CloneWars.sh -c CVM_NAME_OR_IP -h TARGET_HOSTNAME -i TARGET_IPADDRESS -m NETWORK_NETMASK [-n NETWORK_NAME] [-d xxxGB] [-r xxxxMB] [-v x] [-o x] [-F] [-O] [-A] MANDATORY parameters are: -c CVM_NAME_OR_IP Cvm of the target Nutanix cluster -h TARGET_HOSTNAME Name for the new VM -i TARGET_IPADDRESS Network address of the new VM -m NETWORK_NETMASK Netmask of the Network in which the VM will live OPTIONAL parameters are: -n NETWORK_NAME Network Name as shown in 'acli net.list' on nutanix, if not passed will try to atuo-identify -F Force (noprompt) deletion of the vm if exists -O PowerON the vm after creating it -A NOT Add to ipam after creating -d xxxGB Add a disk of xxx(gb) in size, GB is not necessary (Disk will be added in the same container as the 1st disk) -r xxxxMB Customize the vm RAM with xxxxMB -v x Customize the vm with x Virtual CPUs -o x Customize the vm with x cOres (per Virtual CPUs)
All te parameters are self-explanatory (I think)
linux/cloud-init/project_clonewars.txt · Last modified: 2022/02/11 11:36 by 127.0.0.1