95 Commits

Author SHA1 Message Date
276e98bcc3
Update formatting/spaces and more boot-source-selection stuff
* More tabs to spaces, so that formatting and disaply looks the same
  on terminal and text editor
* Ensure that only amd64 are being sync'd
* If using MAAS 2.9, then focal gets downloaded by default, so add
  bionic to the list too
* Cross out items in TODO that have now been implemented
2020-12-29 16:59:25 +00:00
39817eca47
Use maas 2.9 now 2020-12-29 15:28:17 +00:00
9add788935
Update to latest api key 2020-12-29 15:27:05 +00:00
86b4fd9459
Updates on the boostrap-maas now for clouds. Use DHCP by default, as problems with AUTO
Failed to allocate the required AUTO IP addresses after 2 retries.
2020-12-29 14:08:41 +00:00
01793ffc49
Bootstrap MAAS fixes and update for SNAP 2020-12-29 12:47:27 +00:00
30ac86aa3f
Fix typo, add pod back, update maas_api_key 2020-12-29 11:20:17 +00:00
e00742c81d
boostrap maas work
* Install and Build working and tested for snap installation
* Added VLAN, spaces awareness in the subnets and added to the same fabric
2020-12-29 00:55:36 +00:00
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
c95bff6d92
Update hp01 config, and cloud-init
* Make password and virsh user consistent on hp01
* Update the config to reflect the network config from hp01
* Add timezone and byobu config in cloud init
2020-12-28 13:46:23 +00:00
872771f933
use the lsb command to grab codename/series 2020-12-28 12:19:35 +00:00
5e7ec80294
Update spacing in cloud-init, install maas via snap 2020-12-28 12:16:55 +00:00
8b623b739d
Add wipe_disk.sh
* This will allow to run a quick script to wipe the headers
  of the disk, so that we don't have to login after a
  re-comission of the machine to manually reboot it
2020-12-28 11:19:11 +00:00
d5bb8a353c
Update cloud-init
* Update script to add all stuff from install_kvm into it, rather than
  runcmd.
* Update the virsh user as per the MAAS code
* Add support to add focal, only change of packages
2020-12-28 11:12:50 +00:00
53e4d3ae76
Fix todo list 2020-12-28 10:51:31 +00:00
8d79b0721e
Add initial TODO list 2020-12-28 10:50:29 +00:00
ee0b7bec42
Set all the VMs with tag pod-console-logging
This ensures that "console=tty1 console=ttyS0" is set on the
kernel command line for all the VMS
2020-12-28 10:49:37 +00:00
b7c47ef0ee
Add pod for the hypervisor and other fixes
* Add pod creation, so that when we remove the hypervisor
  then all the VMs also get removed automatically
* virtinst is only used when creating/installing VMs, so
  only install on hypervisor nodes
* Only grab the top vlan if we have 2, this typically
  means that we have an ipv4 and ipv6 IP. Could probably
  do this better, but keep it simple for the time being
2020-12-28 10:17:07 +00:00
121ff6b456
fix cloud-init and fix options 2020-12-28 09:31:10 +00:00
daa717cfb7
Now also create the partitioning too
* Added flag to do networking from CLI too
2020-12-27 19:16:33 +00:00
174aeb558d
Move the linux_kvm stuff to a script 2020-12-27 17:40:02 +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
5fa6255160
Fix some typos, and qemu_connection temp fix 2020-12-26 21:20:00 +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
f9ba912164
Move the sshd_config stuff to a script 2020-12-26 09:50:10 +00:00
cd550ec378
Add stuff from maas function when install_kvm=true
https://git.launchpad.net/maas/tree/src/metadataserver/vendor_data.py?h=2.8#n168
using install_kvm=true vi the deploy and having user_data didn't work
so using this method instead
2020-12-25 20:11:38 +00:00
96c129298f
Add ksmtuned, move group stuff to runcmd instead 2020-12-25 19:48:41 +00:00
0f9b5154d0
Update second machine details, and finalise runcmd 2020-12-25 18:43:13 +00:00
57a886fc6d
update user_data 2020-12-25 18:16:11 +00:00
d21758daab
Update config, and add deploying of hypervisor node 2020-12-25 17:51:21 +00:00
3422dafc34
Add virtinst, that's what has the virt-install command 2020-12-24 11:49:41 +00:00
a3d11cd11d
Update config for asrock02 machine 2020-12-24 11:19:56 +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
cff4d52a83
Add storage_path default based on original config 2020-12-23 17:08:56 +00:00
35176c00af
fix array assignment 2020-12-23 16:59:40 +00:00
67c77ca8ab
Add network_type for hypervisors in use 2020-12-23 16:47:41 +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