Adding helm chart for maas
This commit is contained in:
parent
aa54b83c22
commit
de372399a1
26
maas/.helmignore
Normal file
26
maas/.helmignore
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# Patterns to ignore when building packages.
|
||||||
|
# This supports shell glob matching, relative path matching, and
|
||||||
|
# negation (prefixed with !). Only one pattern per line.
|
||||||
|
.DS_Store
|
||||||
|
# Common VCS dirs
|
||||||
|
.git/
|
||||||
|
.gitignore
|
||||||
|
.bzr/
|
||||||
|
.bzrignore
|
||||||
|
.hg/
|
||||||
|
.hgignore
|
||||||
|
.svn/
|
||||||
|
# Common backup files
|
||||||
|
*.swp
|
||||||
|
*.bak
|
||||||
|
*.tmp
|
||||||
|
*~
|
||||||
|
# Various IDEs
|
||||||
|
.project
|
||||||
|
.idea/
|
||||||
|
*.tmproj
|
||||||
|
|
||||||
|
secrets/
|
||||||
|
patches/
|
||||||
|
*.py
|
||||||
|
Makefile
|
3
maas/Chart.yaml
Executable file
3
maas/Chart.yaml
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
description: Chart to run MaaS
|
||||||
|
name: maas
|
||||||
|
version: 0.1.0
|
29
maas/README.md
Normal file
29
maas/README.md
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# aic-helm/maas
|
||||||
|
|
||||||
|
This chart installs a working version of MaaS on kubernetes.
|
||||||
|
|
||||||
|
|
||||||
|
### Quickstart
|
||||||
|
|
||||||
|
To deploy your MaaS chart:
|
||||||
|
|
||||||
|
```
|
||||||
|
helm install maas --namespace=maas
|
||||||
|
```
|
||||||
|
|
||||||
|
To verify the helm deployment was successful:
|
||||||
|
```
|
||||||
|
# helm ls
|
||||||
|
NAME REVISION UPDATED STATUS CHART
|
||||||
|
opining-ocelot 1 Wed Nov 23 19:48:41 2016 DEPLOYED maas-0.1.0
|
||||||
|
```
|
||||||
|
|
||||||
|
To check that all resources are working as intended:
|
||||||
|
```
|
||||||
|
# kubectl get all --namespace=maas
|
||||||
|
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
|
||||||
|
svc/maas-region-ui 10.109.228.165 <nodes> 80/TCP,8000/TCP 2m
|
||||||
|
NAME READY STATUS RESTARTS AGE
|
||||||
|
po/maas-rack-2449935402-ppn34 1/1 Running 0 2m
|
||||||
|
po/maas-region-638716514-miczz 1/1 Running 0 2m
|
||||||
|
```
|
38
maas/templates/deployment.yaml
Normal file
38
maas/templates/deployment.yaml
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: maas-region
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: maas-region
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: maas-region
|
||||||
|
image: {{ .Values.image_maas_region }}
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: {{ .Values.maas_region_container_port }}
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
---
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: maas-rack
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: maas-rack-controller
|
||||||
|
spec:
|
||||||
|
hostNetwork: true
|
||||||
|
containers:
|
||||||
|
- name: maas-rack
|
||||||
|
image: {{ .Values.image_maas_rack }}
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: {{ .Values.maas_rack_container_port }}
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
18
maas/templates/service.yaml
Normal file
18
maas/templates/service.yaml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: maas-region-ui
|
||||||
|
labels:
|
||||||
|
app: maas-region-ui
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: {{ .Values.service_gui_port }}
|
||||||
|
targetPort: {{ .Values.service_gui_target_port }}
|
||||||
|
protocol: TCP
|
||||||
|
name: gui
|
||||||
|
- port: {{ .Values.service_proxy_port }}
|
||||||
|
targetPort: {{ .Values.service_proxy_target_port }}
|
||||||
|
protocol: TCP
|
||||||
|
name: proxy
|
||||||
|
selector:
|
||||||
|
app: maas-region
|
31
maas/tests/test-pxe-client.sh
Executable file
31
maas/tests/test-pxe-client.sh
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/bash -x
|
||||||
|
|
||||||
|
# this helps create a qemu client (not using kvm acceleration
|
||||||
|
# so it doesn't conflict with virtualbox users) that can be
|
||||||
|
# used to test that maas is working
|
||||||
|
|
||||||
|
cat <<EOF>/tmp/maas-net.xml
|
||||||
|
<!-- Network Management VLAN -->
|
||||||
|
<network>
|
||||||
|
<name>maas</name>
|
||||||
|
<bridge name="maas"/>
|
||||||
|
<forward mode="bridge"/>
|
||||||
|
</network>
|
||||||
|
EOF
|
||||||
|
|
||||||
|
virsh net-create /tmp/maas-net.xml
|
||||||
|
|
||||||
|
# purge an existing image if one exists
|
||||||
|
if [ -e /tmp/maas-node-test.qcow2 ]; then
|
||||||
|
sudo rm /tmp/maas-node-test.qcow2
|
||||||
|
sudo qemu-img create -f qcow2 -o preallocation=metadata /tmp/maas-node-test.qcow2 32G
|
||||||
|
fi;
|
||||||
|
|
||||||
|
virt-install \
|
||||||
|
--name=maas-node-test \
|
||||||
|
--connect=qemu:///system --ram=1024 --vcpus=1 --virt-type=qemu\
|
||||||
|
--pxe --boot network,hd \
|
||||||
|
--os-variant=ubuntutrusty --graphics vnc --noautoconsole --os-type=linux --accelerate \
|
||||||
|
--disk=/tmp/maas-node-test.qcow2,bus=virtio,cache=none,sparse=true,size=32 \
|
||||||
|
--network=network=maas,model=e1000 \
|
||||||
|
--force
|
14
maas/values.yaml
Normal file
14
maas/values.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# Default values for maas.
|
||||||
|
# This is a YAML-formatted file.
|
||||||
|
# Declare variables to be passed into your templates.
|
||||||
|
|
||||||
|
image_maas_region: quay.io/attcomdev/maas-region:1.0.1
|
||||||
|
image_maas_rack: quay.io/attcomdev/maas-rack:1.0.1
|
||||||
|
|
||||||
|
maas_region_container_port: 80
|
||||||
|
maas_rack_container_port: 80
|
||||||
|
|
||||||
|
service_gui_port: 80
|
||||||
|
service_gui_target_port: 80
|
||||||
|
service_proxy_port: 8000
|
||||||
|
service_proxy_target_port: 8000
|
Loading…
Reference in New Issue
Block a user