Commit Graph

121 Commits

Author SHA1 Message Date
53b2988fc2 Ensure that the juju controller has 2 cores
When having large models the load on the vms can go high.
Having them with 2 cores helps with the loads reducing
significantly.
2021-01-25 13:50:09 +00:00
e6d0cdd2f2 Go back to using IPs, DNS sucks 2021-01-20 22:13:46 +00:00
3a17c1f159 Update/add functions
* Standardise 2 functions, as they did similar things, but a very slight change
* Added setting the zone of a machine
2021-01-17 20:12:17 +00:00
9cf89e478f Also remove nvram 2021-01-17 19:17:47 +00:00
5d837ae9ff A few updates
* Give capability to tag or not
* fix -d option
* Update hp01 config
2021-01-17 19:06:56 +00:00
7e36aa1432 Add wakeonlan support for my hypervisors 2021-01-08 10:09:34 +00:00
25e5553332 Add asrock03 mac, and update control_cpu to 4 2021-01-07 17:12:28 +00:00
034c192f46 Update server details for mirrors, change start end points for dhcp 2021-01-07 09:00:02 +00:00
010264eb44 Add local repo 2021-01-04 20:44:56 +00:00
1ec2594717 making sure that the secureboot is for TESTING only 2021-01-03 20:32:32 +00:00
d6f57017bd Add uefi and a test secureboot option 2021-01-03 12:15:12 +00:00
57b430ca36 fix typo 2021-01-02 14:52:16 +00:00
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