109 Commits

Author SHA1 Message Date
c17d888f45
Update further
* Don't start the vm, as the commission/create of node will do
  that automatically
* Fix the maas node, if the mac address differ
2021-01-02 14:12:45 +00:00
4edfca32ba
add back maas_assign_networks but not in the upper if stmt 2021-01-02 12:02:24 +00:00
b5c731d57a
Update default_config
My maths was a bit off for node_count
Start of soemthing to enable legacy or uefi based VMs
2021-01-02 11:44:16 +00:00
be82cea841
Fix check on manage-maas 2021-01-02 11:36:19 +00:00
24b1e73ef0
Remove the duplicate maas_assign_networks call 2021-01-02 11:15:48 +00:00
4a6485a14a
Rework a few bits
* Move the commision_vm/node to functions.sh
* if machine already exists in maas, then re-use it
* move node variables above the node_num, to calculate correctly
2021-01-02 11:07:21 +00:00
d53d6c25c7
bootstrap maas updates
* parametrise maas_kernel_opts and maas_name, so that it's not specific
  for an environment
* update boot-source-selections such that we have both focal and bionic
  by default
2020-12-31 13:35:13 +00:00
efab2d3628
Updates on configs
* Add comments to the default.config file
* move the node_count to the default.config, this will allow to use
  customised value if needed
* If pod-console-logging tag is to be added, then add correctly,
  Otherwise, if we are adding fresh pods after tag creation, the pods
  will fail to add. This also allows for other cases to be fulfilled if
  required
2020-12-31 12:47:34 +00:00
2b57cff585
Add option for hypervisor and therefore re-jig read_config 2020-12-30 22:08:49 +00:00
c83756a3e9
Remove the need for bc 2020-12-30 13:28:37 +00:00
f741007501
Update bootstrap-maas, auto calculate node_count
* Ensure that the boot-sources are done at the beginning to give it
  time to sync
* Automatically calculate the amount of VMs depending on memory
2020-12-30 09:36:48 +00:00
9d585beddc
Update server IP, and default node count to 9
* Although the default is 9, 1 is 8GB and 1 extra for juju, which
  oversubscribes the memory to 44GB
2020-12-30 08:45:14 +00:00
f617c3eebb
Reorder some IPs, update api key, and add start/end for dhcp 2020-12-30 07:59:12 +00:00
742eef5901
Update the subnets, and revert the mode to AUTO
* enable/disable managed on the subnets. This resolves the problem where AUTO IP
  doesn't seem to work. This is a workaround to help with this
* Revert the AUTO mode, now that the above issue is resolved
2020-12-29 20:53:37 +00:00
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