Commit Graph

68 Commits

Author SHA1 Message Date
SPEARS, DUSTIN (ds443n) ba3657c0c1 Add option to mount host path for cgroups
Capability added to disable cgroups host path volume

Change-Id: I007d9a79b812094126fadb36fd743133495d337f
2023-09-19 13:24:28 -04:00
Anselme, Schubert (sa246v) 736c936394
Parametrise readiness probe
Change-Id: I358ae8307799fff0674a428c42b90381d6d3a631
Signed-off-by: Anselme, Schubert (sa246v) <sa246v@att.com>
2023-08-23 14:42:59 -04:00
Ruslan Aliev 23a2b557f1 Revert "Upgrading MAAS to v3"
This reverts commit 129d958a51.

Reason for revert: reverting back to 2.8.7 to modify chart

Change-Id: I68d3abfb19decc5eb470fcf43694506bc5edd4b6
2023-02-16 15:32:01 -06:00
Anselme, Schubbert (sa246v) 129d958a51
Upgrading MAAS to v3
Signed-off-by: Anselme, Schubert (sa246v) <sa246v@att.com>
Change-Id: I4b5a5f6a7e21d790cce13a5ccff9819f517cad64
2022-11-23 12:55:52 -05:00
Ruslan Aliev 2d5b698d9e Switch PVCs to use storageClassName
HTK and Helm versions are also updated.

Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Change-Id: Ia1ef4ec23f53dcb591e139c3476e143a55351fd3
2022-09-16 19:02:23 -05:00
Phil Sphicas 50b3d68905 Control bind9 and nginx resource usage
The named and nginx processes both try to use all available CPUs. In
addition, there is a bug in named that sometimes causes it to spin on a
FUTEX, pegging the CPU.

This change constrains those processes to a single CPU (overridable in
values.yaml), and includes /etc/bind/bind.keys in named.conf to avoid
the CPU spike.

Change-Id: I4a278023f5c0dd5e7bdee46891591b278f2ddcad
2021-11-10 23:35:50 -08:00
Phil Sphicas b648edfe40 Deploy MAAS 2.8 on Ubuntu bionic
Image changes:
* base image ubuntu:18.04
* MAAS version 2.8.6-8602-g.07cdffcaa-0ubuntu1~18.04.1 from ppa/2.8
* default contents of /var/lib/maas are archived in /opt/maas
* updated patches:
  - 2.3_bios_grub_partition.patch, changed in maas [0]
  - 2.3_partitiontable_does_not_exist.patch, changed in maas [1] [2]
  - 2.3_secure_headers.patch, updated for twisted 17.9.0 [3]
* removed patches:
  - 2.3_bios_grub_preseed.patch, changed in maas, now N/A [0]
  - 2.3_hostheader.patch, fixed in maas [4]
  - 2.3_maas_enlist.patch, fixed in maas [5]
  - 2.3_mac_address.patch, fixed in maas [6]
* new patches:
  - 2.8_maas_ipmi_autodetect_tool.patch, enlistment reliability
* reformatted patches due to blackening change [1]:
  - 2.3_configure_ipmi_user.patch
  - 2.3_ipmi_error.patch
  - 2.3_kernel_package.patch, custom req to specify kernel package
  - 2.3_nic_filter.patch, custom req to ignore cali* interfaces
  - 2.3_region_secret_rotate.patch
  - 2.3_route.patch

Chart changes:
* maas-region podport is 5240
* maas config option http_boot is no longer configurable [7]
* start script restores some default files into /var/lib/maas
* register-rack-controller script removes old files in /etc/maas
* enlist userdata now matches commissioning/curtin userdata [8]
* force_gpt option is removed [9], as GPT is now the default
* update to configure remote_syslog in import resources job [10]
* enlist_commissioning is disabled for backwards compatibility [11]

0: d8e234eb09
1: db30bb39fa
2: 665feb7575
3: https://github.com/twisted/twisted/blob/twisted-17.9.0/src/twisted/web/server.py
4: 573da69729
5: d390a1da6a
6: 34631c2fe5
7: 0e94c26a53
8: 22641cffcc
9: 97c25a0486
10: d67c359c7b
11: 51b9712c20

Change-Id: I0685d76cf083ff5aa33c8db552059721289d5c53
2021-08-03 21:56:23 +00:00
Phil Sphicas 35fa3175e3 Allow additional preseed overrides
Sometimes the ephemeral environment needs additional cloud-init data.
This change allows user-data sections to be added to the default files
in /etc/maas/preseeds: enlist, commissioning, and curtin.

For example, to resolve issues with 'apt-get update' failures during
enlistment, something like this may be necessary:
conf:
  cloudconfig:
    override: true
    sections:
      bootcmd:
        - "rm -fr /var/lib/apt/lists"

Change-Id: I817006a799003ace3f35d02507489720b0f9079b
2021-02-12 06:29:10 +00:00
KHIYANI, RAHUL (rk0850) 2dd543c841 override security context capabilities to values.yaml
Change-Id: I1120a4f5325172a8ece7d2ce8bb24706e28b319f
2020-08-06 12:20:30 -05:00
KHIYANI, RAHUL (rk0850) f899a11a06 Fix: updating maas-syslog to readOnly-fs false
updating it to false as it requires write permission to write pid file

Change-Id: I2b68ef641619a56d88bd4c659fe75d40267e3977
2020-07-31 17:14:34 -05:00
KHIYANI, RAHUL (rk0850) 926dadfbf4 [FIX] override security context capabilities in values.yaml
Add missing helm-toolkit snippet for ingress-errors container

Change-Id: I9c7ec6b71a1d026257c2a1f76e18a3e3be8e244d
2020-07-21 03:56:42 +00:00
KHIYANI, RAHUL (rk0850) 20c6e525ea Implement helm-toolkit snippet to maas pods/containers
This updates the maas chart to include the pod
security context on the pod template.

This also adds the container security context to set
readOnlyRootFilesystem flag

Change-Id: I1eba6ab3a7c27ddcb3e8ddc8e743b91dc5e521c3
2020-07-20 14:43:41 +00:00
Zuul 749a968d90 Merge "Enable Docker default AppArmor profile to maas" 2020-06-26 16:20:39 +00:00
KAVVA, JAGAN MOHAN REDDY (jk330k) a8a530bec7 Enable Docker default AppArmor profile to maas
This adds default Apparmor profile to maas-cache container.

Change-Id: Ib181189d968e328291b802d1528b33fc74b7873e
2020-06-26 08:44:58 -05:00
Phil Sphicas 843089243b Allow additional late_commands in curtin userdata
This change allows extra late_commands to be added to the curtin
userdata, which are executed before the node is rebooted at the end of
the deployment. This can be useful to install packages or perform other
customization.

One sample use-case is the installation of specific kernel module
packages that match the target kernel image, in cases where the
ephemeral environment uses a different kernel version.

Change-Id: I80084c544f6a7dafd6aa84c8041cf86bdc3b9f4b
2020-06-20 18:57:42 +00:00
Phil Sphicas 6f6c9b4aec Fix rendering of obscure MAAS file drivers.yaml
The existing drivers.yaml rendered by the MAAS chart is missing the
top-level 'drivers' key, so it doesn't actually work. This change fixes
the rendering of the file, and adds a comment in values.yaml about where
to look for additional information about where and how the file is used:

https://github.com/maas/maas/blob/2.3.5/src/maasserver/third_party_drivers.py

Change-Id: I940c8a57d3e404a101de5c1ea92f8a467319dbaa
2020-06-20 17:46:34 +00:00
Phil Sphicas 97c25a0486 maas-region: option to always use GPT
MAAS uses MBR for boot disks smaller than 2 TiB. This change provides an
option to force the use of GPT, regardless of boot disk size. The chart
value is: conf.maas.force_gpt=true.

The 2 TiB "threshold" for when GPT is required is simply lowered to 0:
https://github.com/maas/maas/blob/2.3/src/maasserver/models/partitiontable.py#L51-L53

This change could be accomplished with a patch to the maas-region image
directly, but then it would not be configurable, and it may not be
useful for all users. Using sed in the startup script seems like a fair
solution.

Change-Id: I87d3f4b9c97048cdef383cbd15c5a16ac219066b
2020-06-02 02:17:18 +00:00
Zuul 8f35260091 Merge "Enabling Apparmor for maas test containers" 2020-05-27 14:59:55 +00:00
DODDA, PRATEEK 9f897d33e4 Enabling Apparmor for maas test containers
Change-Id: I935f2fb265656b7e5f630c3ae215dddcf334fd02
2020-05-20 20:04:33 +00:00
Zuul 329154c083 Merge "MAAS chart: configure extra MAAS settings" 2020-05-20 04:53:00 +00:00
Phil Sphicas 636777ee79 MAAS chart: configure extra MAAS settings
Provide a knob to adjust some less-common MAAS configuration settings.
Changes the default values as follows: disables network discovery, sets
the active subnet mapping interval to 0 (from 10800 seconds), marks the
intro as completed, and disables Google analytics.

Refer to `maas $PROFILE maas set-config -h` for the list of available
configuration items.

Change-Id: I46d348ef5777e22ebeb7a062e5f6061d9ad61a1c
2020-05-03 07:56:06 +00:00
KAVVA, JAGAN MOHAN REDDY (jk330k) b2e100f6ce Enable Docker default AppArmor profile to maas
This adds default Apparmor profile to maas.

Change-Id: I9c68fdb2be074c855085032dfe9ff0dbbeadcf7c
2020-04-02 15:24:40 +00:00
Anderson, Craig (ca846m) 5af724cff0 Add ability to configure system account password
Change-Id: Ifae2fa7d19472c601069ba9dff5b24396c2db338
2020-03-18 13:25:41 -07:00
Trung Thai e22afb6e95 Add log_level attribute in the Chart to allow overwrite of default
Provide the ability to overwrite the default logging level.
Use 'info' as the default with log_level attribute.

Change-Id: I4bfd82a568c1eaad7de891bd103b3f8ff032e589
2020-02-13 02:12:15 +00:00
Phil Sphicas 0a8b01bb72 Chart uplift: ingress-nginx-controller 0.26.1
Uplifts the ingress-nginx-controller image to 0.26.1, including the
required chart modifications for RBAC, new options for stream and
profiler ports, and a change in the default status port from 18080
to 10246.

Change-Id: Ia0b33a739ea180de45b7e3920968d12ea651a573
2020-01-01 14:30:10 -08:00
Zuul ae902d8510 Merge "Allow to configure service network policy" 2019-09-27 10:29:27 +00:00
Zuul 3ef4059c41 Merge "[fix] Run maas-ingress as root" 2019-09-26 16:11:53 +00:00
Dejaeger, Darren (dd118r) b7c29d2414 (tests) Add NodeSelector to Helm test
- Addition of a NodeSelector into the MAAS API helm test pod spec,
to assist it getting placed onto the correct set of nodes.

Change-Id: I31ca107a20f358760b77cadeef1a7f01bd8eb885
2019-09-24 10:58:14 -04:00
anthony.bellino 5c81f630d4 [fix] Run maas-ingress as root
Maas ingress needs to be able to bind
to privileged ports.

Change-Id: Ibfa0e8c8f127e3b91483dc3b9c4a4614cb15554b
2019-09-23 23:43:21 +00:00
Evgeny L 9871309fda Allow to configure service network policy
The patch introduces network policy configuration similar
to openstack-helm services. It allows users to configure
policies depending on the environment.

* Network policies are disabled by default.
* When enabled default policies allow all ingress and
  egress traffic (i.e. policy set to {}), this may be
  changed in future patch-sets.

Change-Id: I288ad9ad82d4820d70cccd26b73d3c1a44862f9e
2019-09-20 19:52:13 +00:00
BARTRA, RICK 5641cc1117 maas-ingress and maas-ingress-errors pods with non-root user
Run the maas-ingress and maas-ingress-vip containers with the
'www-data' (33) user

Run the maas-ingress-errors container with the error-page image [0],
from [1] which already runs as nobody user.

[0] Dockerfile.404-server-with-metrics
[1] https://github.com/kubernetes/ingress-gce

Change-Id: Idf3791a958017d512bb3f5015b59452e2831b1b3
2019-09-04 15:31:26 +00:00
Scott Hussey 5b2a7a2439 syslog listener for physical nodes
- Add a new pod running syslog to receive syslog
  messages containing the console logs of bootstrapping
  nodes. This aids in troubleshooting without requiring
  accessing the OOB console.
- Add a UDP forwarder to the MAAS ingress controller
  as nodes attempt to send syslogs to UDP 514 of the region
  controller

Change-Id: I3f508225f4394a90c6f2534a51f262b42c1afa4e
2019-08-23 13:22:38 +00:00
Hussey, Scott (sh8121) 922db8aee1 Provide dependency chain on maas-ingress
- Create a new monitor service to detect when maas-ingress
  Pods are ready
- Add maas-ingress dependency for maas-region and anything depending
  on it
- Add the admin user bootstrap as a dependency on the apikey export
  and MAAS configuration/import jobs

Change-Id: I4d15526b77b5dd51267bbb07e6fcc624d5eee17a
2019-07-01 15:37:23 -05:00
Zuul 290bbf1adc Merge "Maas: Add pod/container security context" 2019-05-20 16:12:51 +00:00
Rahul Khiyani 809b329de8 Maas: Add pod/container security context
- deployment-ingress-errors.yaml

This updates the maas chart to include the pod
security context on the pod template.

This also adds the container security context to set
readOnlyRootFilesystem to true

Change-Id: Id377f31aacc65e8ba31a360d9283fda225e7732a
2019-05-20 15:26:22 +00:00
Kaspars Skels f6844a5987 Support for MAAS URL overrides
Change-Id: I64af23c11f1717b6f0c2d52ec49edda8c31dff78
2019-04-23 15:42:44 -05:00
Scott Hussey a833b682db (security) Optionally only allow MAAS api access
- MAAS does not allow you to turn off the gui which
  may be desired in some scenarios. Use Ingress rules
  to do so optionally.

Change-Id: I22f637ebd2dbbd7c552fd4644bcf27cc9b9661d8
2019-02-04 11:25:44 -06:00
Scott Hussey bb81a1cecd Support tuning of the ingress fallback error pages
- If the error pages service doesn't have endpoints, ingress
  will start up a default service. Allow the port for this
  service to be tunable.

Change-Id: I3f60a7cb47570459da99fcd854c453e81330b052
2018-12-14 14:11:02 -06:00
Scott Hussey 617607e426 (fix) Fix static ports in MAAS ingress
- Some residual static configuration was left in the MAAS ingress
  deployment template. Update it to render the ingress ports from
  endpoints and also to remove the TCP forwarder for the MAAS
  region API and instead use a standard Ingress resource.

Change-Id: I7764d48ea919147503e9bf2521c52cb6f0028538
2018-12-07 22:18:45 +00:00
Crank, Daniel (dc6350) 2aaca3f60b Apparmor profile for MaaS
All containers were already running in non-privileged
containers except region-controller and rack-controller.
Both of those require privileged containers but
can still function with the docker-default apparmor
profile applied.

This PS uses the new, more generic HTK snippet name
(see https://review.openstack.org/613703).

Change-Id: Icaa720f05b18f4264ae7098b427fe5f639cba2c6
2018-12-07 16:17:11 -06:00
Zuul 9b527b4b99 Merge "Support YAML sequence for DNS and NTP servers" 2018-11-21 15:35:59 +00:00
Scott Hussey 1c0485e3e6 Support MAAS HA
- Create two replicas of rack and region pods
- Use required anti-affinity between rack pods
- Remove the MAAS ingress controller from the rack pod
  and into dedicated deployment
- Update rack registration script to harvest the systemid
  from the underlying host when available

Change-Id: I41e21b7bb5256d04b37a70fbd2088c617b5d239a
2018-11-05 21:08:15 +00:00
Scott Hussey 74af40376b MAAS support for pod mobility
Upgrades to the MAAS chart to allow for the Pods
running the rack and region services to work across
all control plane hosts.

Change-Id: I84c856599a1122a2b4a64242a7cea357887b0462
2018-10-23 08:19:53 -05:00
Scott Hussey 56cc46f9f0 Support YAML sequence for DNS and NTP servers
- When specifying the list of upstream DNS or NTP servers
  to configure MAAS with, use YAML sequences rather than
  forcing a string

Change-Id: If0da29c0ad2c7299250ecba120bca54920e54052
2018-10-22 14:35:55 -05:00
Kaspars Skels e53cb2d237 Set MAAS internal proxy to 31800
Looks like new version of MAAS has fixed long standing bug
https://bugs.launchpad.net/maas/+bug/1779712

This will match internal MAAS ports to NodePort.

Change-Id: I639a4c492eb80545c69fd132d3b2dc4cca524933
2018-10-19 09:06:28 -05:00
Roman Gorshunov d5448b360e Fix: various documentation and URL fixes
1) UCP -> Airship
2) readthedocs.org -> readthedocs.io (there is redirect)
3) http -> https
4) attcomdev -> airshipit (repo on quay.io)
5) att-comdev -> openstack/airship-* (repo on github/openstack git)
6) many URLs have been verified and adjusted to be current
7) no need for 'en/latest/' path in URL of the RTD
8) added more info to some setup.cfg and setup.py files
9) ucp-integration docs are now in airship-in-a-bottle
10) various other minor fixes

Change-Id: I8fe2ac12a3e104309e818d956313693c3ba6f7cc
2018-09-24 12:53:27 +02:00
Pete Birley 582c4d8b20 Chart: Modernise chart
This PS updates the maas chart to support modern helm toolkits.

Change-Id: Id70343afdec622dc84b89b0d7f496e9ef498ea6b
Signed-off-by: Pete Birley <pete@port.direct>
2018-08-22 21:53:33 -05:00
Zuul ca4e22d240 Merge "Upgrade the version of kubernetes-entrypoint for UCP helm charts" 2018-07-19 17:09:07 +00:00
hosingh000 4b5dfcdf6d Upgrade the version of kubernetes-entrypoint for UCP helm charts
Change-Id: I28a4f7fb2bfe226a941b7af127a52e046283b472
2018-07-06 15:47:11 -05:00
Scott Hussey b09fee26b8 (fix) Make rackd stateful
- Use a statefulset and PVC to make rackd systemid assignment
  stateful between pod restarts. This is to alleviate instability
  in MAAS upgrades.

Change-Id: Iea5c3d3897b561d4ba479203ee6aec5885282e1a
2018-06-29 07:37:28 -05:00