40 Commits

Author SHA1 Message Date
1ca6934c38
Don't create libvirt VM, if it already exists 2020-12-29 00:41:42 +00:00
94b8d9476b
Add check to see if file exists
If it exists, then doesn't overwrite it

Closes GH issue #1
2020-12-28 17:37:43 +00:00
f16140eac0
Added juju VMs as part of maas-manage-nodes.sh
Some of this is a hack, and some of this needs re-working, but this is
the initial work for this so that this can be fine tuned for later
2020-12-28 17:08:10 +00:00
40694207a3
Update assign_networks function
* Update the function, such that when subnet_id is null, then based on
  the vlan, grab the details from the subnets defined, and update the
  links based on this. This ensures that all subnets are auto-assigned
  and the externel_vlan is dhcp from the upstream network
* Revert the network_auto function, as the above change would help with
  the issues we faced before
* Update all the maas function calls, and assign them to a variable or
  direct the output to /dev/null, as we don't want the screen to be
  filled with all the information
TODO: Have viable output to the CLI, so that you have some details of
what is going on
2020-12-27 17:25:21 +00:00
8058f117cb
Update auto networks
* So that all the networks now will have be either static, auto or dhcp
* network_auto will not work out of the box, it can only effectively
  work after commissioning of a machine
2020-12-27 13:37:52 +00:00
58cfe4b468
fix typo 2020-12-27 10:33:11 +00:00
c304c99817
Add function to recomission VMs 2020-12-27 10:32:11 +00:00
2567ff0cf3
Add option to update all networks 2020-12-27 10:12:42 +00:00
35d195c334
More updates
* Move stuff from common to default, as it didn't make sense
* use virsh_user instead, that was its more customisable
* Revert the change to manage-maas-nodes.sh now use extra function to
  call maas_auto_assign_networks instead
* More comments to the code
2020-12-27 10:06:21 +00:00
426a8dd56f
fix function call 2020-12-26 21:05:23 +00:00
770ade65ba
Move maas_add_node to functions, and standardise 2020-12-26 20:41:41 +00:00
098be2f389
Many update
* Move all configs into config directory
* Move all examples into example directoy
* Move all common functions into functions.sh
* Fine tune a few other functions
* Moved common hypervisor config away
* Added examples for some of the hypervisor configs
* Start work on snap enablement of boostrap-maas.sh script
2020-12-26 20:03:28 +00:00
3422dafc34
Add virtinst, that's what has the virt-install command 2020-12-24 11:49:41 +00:00
37e8b518f5
Add help function 2020-12-23 20:03:00 +00:00
3e053d7bcd
Fix typo from the bridges array 2020-12-23 19:32:35 +00:00
35176c00af
fix array assignment 2020-12-23 16:59:40 +00:00
f467c70ed9
add the feature to have either network or bridge for virt-install 2020-12-23 16:45:35 +00:00
b12f28aeca
Fix more tab to spaces, Add comments 2020-12-23 16:37:26 +00:00
02d222c3a8
Change all tabs to spaces 2020-12-23 16:00:28 +00:00
9700bfa74e
More fine tunning and comments
* Add the 4th HEX for the MAC address too
* Add comments in the destroy VM function
* Fix spacing, so that it's consistent in the destroy VM function
2020-12-23 15:58:03 +00:00
fb3a6d76da
More updates
* Make the variables consistent across all the functions
* build_fanout instead of build_timeout
* Release machine in maas, if we're wiping the disk for re-using
* Move the for loop to check for machine being ready into a function,
  so that it's re-usable
* Update some formatting fixes to README.md
2020-12-23 14:54:27 +00:00
d19bf0a93e
seperate out configs
* move out the maas.config to rpi4, just incase I move things around
* add asrock02 pending maachine to arrive soon
* add os-variant
2020-12-22 19:56:31 +00:00
297bc33aab
move the disk definition to the hypervisor config 2020-12-22 18:28:16 +00:00
36065d8dd1
fix curlies for array 2020-12-22 18:25:06 +00:00
fe90e59161
Put the disks in arrays, to be more dynamic 2020-12-22 18:14:42 +00:00
68cb074d33
Use the maas_profile variable 2020-12-22 14:16:57 +00:00
70a79c99aa
more fixes
* Use the maas snap for the maas-cli stuff, as there is no recent maas-cli deb
* update the way to tag a node, which now works
* put back the double ampersand for creating the VM
2020-12-22 13:58:30 +00:00
373ee0ff1c
More updates
* Add hypervisor config file to standardise script
* Add macs and bridges as an array
2020-12-22 12:50:53 +00:00
3c35b5de22
Get maas tags to work, fix tabs for virt-install 2020-12-22 10:14:50 +00:00
7a65a06f35
Update maas-nodes script for my environment
* The script now adds N control nodes at the beginning
* Adds 4 extra interfaces, VLANs in my environment
* Adds the VMs to MAAS, commissions them, and updates the interfaces.
* Add a function that just wipes the VM disks, for re-purposing.
  This allows to release the machines in MAAS, and then re-use them
  without having to re-add/commission the machines.
2020-12-22 08:33:12 +00:00
desrod
bd2d0ad469 Start up the nodes when they're provisioned so maas can find them on the network 2020-05-06 23:27:44 -04:00
desrod
1d031169af Updated for larger disks, faster parallel provisioning 2020-04-29 16:13:28 -04:00
David A. Desrosiers
516cda5d33 Minor updates for local proxy in lxd container 2019-05-23 05:21:31 +00:00
David A. Desrosiers
82685ff2ff Updates for faster kvm nodes, dual NIC support, local mirrors 2019-03-26 16:12:00 +00:00
David A. Desrosiers
368afe9cc9 More minor tweaks to streamline things, optimize kvm nodes 2019-03-13 02:09:09 +00:00
David A. Desrosiers
ad6504670b Updates to handle kvm/VxT host passthrough and more maas tweaks 2019-03-11 04:53:49 +00:00
David A. Desrosiers
186cbbf6e1 Updated for new NUC hardware capabilities 2019-03-01 21:11:47 +00:00
desrod
306cc9e462 Gutted the node provisioning script, rewrote important pieces 2018-04-26 13:35:10 -04:00
desrod
74ac0c9348 Cleaning up unnecessary use of and fixing invalid function entry points 2018-04-26 12:25:32 -04:00
desrod
7494e3ef93 Moving some files around 2018-04-20 14:12:01 -04:00