v0.0.2
This commit is contained in:
@@ -1,5 +1,24 @@
|
||||
---
|
||||
# tasks file for git
|
||||
- name: Create a config map for httpd
|
||||
vars:
|
||||
httpd_server_name: "git.eom.dev"
|
||||
httpd_conf_extra:
|
||||
- httpd-auth.conf
|
||||
- httpd-git.conf
|
||||
k8s:
|
||||
state: present
|
||||
api_version: v1
|
||||
kind: ConfigMap
|
||||
name: git
|
||||
namespace: "eom-{{ target_namespace }}"
|
||||
definition:
|
||||
data:
|
||||
httpd.conf: "{{ lookup('template', 'httpd.conf.j2') }}"
|
||||
httpd-auth.conf: "{{ lookup('template', 'httpd-auth.conf.j2') }}"
|
||||
httpd-git.conf: "{{ lookup('file', 'httpd-gitweb.conf') }}"
|
||||
mime.types: "{{ lookup('file', 'mime.types') }}"
|
||||
|
||||
- name: Create persistent volume for git
|
||||
k8s:
|
||||
state: present
|
||||
@@ -16,7 +35,7 @@
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
storageClassName: standard
|
||||
hostPath:
|
||||
path: "/data/store-0/eom/git"
|
||||
path: "/data/store-0/eom-{{ target_namespace }}/git"
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
@@ -44,17 +63,6 @@
|
||||
storageClassName: standard
|
||||
volumeName: "eom-{{ target_namespace }}-git"
|
||||
|
||||
- name: Create a config map for httpd
|
||||
k8s:
|
||||
state: present
|
||||
api_version: v1
|
||||
kind: ConfigMap
|
||||
name: git
|
||||
namespace: "eom-{{ target_namespace }}"
|
||||
definition:
|
||||
data:
|
||||
httpd.conf: "{{ lookup('template', 'git-httpd.conf.j2') }}"
|
||||
|
||||
- name: Create a deployment
|
||||
k8s:
|
||||
definition:
|
||||
@@ -74,13 +82,13 @@
|
||||
app: git
|
||||
spec:
|
||||
containers:
|
||||
- name: cgit
|
||||
image: invokr/cgit
|
||||
- name: gitweb
|
||||
image: ericomeehan/gitweb
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /etc/httpd/conf
|
||||
mountPath: /usr/local/apache2/conf
|
||||
- name: data
|
||||
mountPath: /var/www/htdocs/cgit
|
||||
mountPath: /usr/local/apache2/htdocs
|
||||
ports:
|
||||
- containerPort: 80
|
||||
volumes:
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
storageClassName: standard
|
||||
hostPath:
|
||||
path: "/data/store-0/eom/mail"
|
||||
path: "/data/store-0/eom-{{ target_namespace }}/mail"
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
- name: Deploy eom openldap
|
||||
include_tasks: openldap.yaml
|
||||
|
||||
- name: Deploy eom mail
|
||||
include_tasks: mail.yaml
|
||||
- name: Deploy eom proxy
|
||||
include_tasks: proxy.yaml
|
||||
|
||||
- name: Deploy eom git
|
||||
include_tasks: git.yaml
|
||||
@@ -24,9 +24,6 @@
|
||||
- name: Deploy eom www
|
||||
include_tasks: www.yaml
|
||||
|
||||
- name: Deploy eom proxy
|
||||
include_tasks: proxy.yaml
|
||||
|
||||
- name: Create network policy
|
||||
k8s:
|
||||
state: present
|
||||
|
||||
@@ -1,5 +1,24 @@
|
||||
---
|
||||
# tasks file for media
|
||||
- name: Create a config map for httpd
|
||||
vars:
|
||||
httpd_server_name: "media.eom.dev"
|
||||
httpd_conf_extra:
|
||||
- httpd-auth.conf
|
||||
- httpd-dav.conf
|
||||
k8s:
|
||||
state: present
|
||||
api_version: v1
|
||||
kind: ConfigMap
|
||||
name: media
|
||||
namespace: "eom-{{ target_namespace }}"
|
||||
definition:
|
||||
data:
|
||||
httpd.conf: "{{ lookup('template', 'httpd.conf.j2') }}"
|
||||
httpd-auth.conf: "{{ lookup('template', 'httpd-auth.conf.j2') }}"
|
||||
httpd-dav.conf: "{{ lookup('file', 'httpd-dav.conf') }}"
|
||||
mime.types: "{{ lookup('file', 'mime.types') }}"
|
||||
|
||||
- name: Create persistent volume for media
|
||||
k8s:
|
||||
state: present
|
||||
@@ -16,7 +35,7 @@
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
storageClassName: standard
|
||||
hostPath:
|
||||
path: "/data/store-0/eom/media"
|
||||
path: "/data/store-0/eom-{{ target_namespace }}/media"
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
@@ -44,19 +63,6 @@
|
||||
storageClassName: standard
|
||||
volumeName: "eom-{{ target_namespace }}-media"
|
||||
|
||||
- name: Create a config map for httpd
|
||||
k8s:
|
||||
state: present
|
||||
api_version: v1
|
||||
kind: ConfigMap
|
||||
name: media
|
||||
namespace: "eom-{{ target_namespace }}"
|
||||
definition:
|
||||
data:
|
||||
httpd.conf: "{{ lookup('file', 'media-httpd.conf') }}"
|
||||
httpd-dav.conf: "{{ lookup('template', 'httpd-dav.conf.j2') }}"
|
||||
mime.types: "{{ lookup('file', 'mime.types') }}"
|
||||
|
||||
- name: Create a deployment
|
||||
k8s:
|
||||
definition:
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
---
|
||||
# tasks file for mongodb
|
||||
- name: Create persistent volume for mongodb
|
||||
k8s:
|
||||
state: present
|
||||
definition:
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: "eom-{{ target_namespace }}-mongodb"
|
||||
spec:
|
||||
capacity:
|
||||
storage: 32Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
storageClassName: standard
|
||||
hostPath:
|
||||
path: "/data/store-0/eom/mongodb"
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- alpha-worker-0
|
||||
|
||||
- name: Create a persistent volume claim for mongodb
|
||||
k8s:
|
||||
state: present
|
||||
definition:
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: mongodb
|
||||
namespace: "eom-{{ target_namespace }}"
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 32Gi
|
||||
storageClassName: standard
|
||||
volumeName: "eom-{{ target_namespace }}-mongodb"
|
||||
|
||||
- name: Create a deployment
|
||||
k8s:
|
||||
definition:
|
||||
apiVersion: v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: mongodb
|
||||
namespace: "eom-{{ target_namespace }}"
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mongodb
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: mongodb
|
||||
spec:
|
||||
containers:
|
||||
- name: mongo
|
||||
image: mongo
|
||||
volumeMounts:
|
||||
- name: mongodb
|
||||
mountPath: /data/db
|
||||
ports:
|
||||
- containerPort: 8081
|
||||
env:
|
||||
- name: MONGO_INITDB_ROOT_USERNAME
|
||||
value: "root"
|
||||
- name: MONGO_INITDB_ROOT_PASSWORD
|
||||
value: "{{ mongodb_root_password }}"
|
||||
volumes:
|
||||
- name: mongodb
|
||||
persistentVolumeClaim:
|
||||
claimName: mongodb
|
||||
|
||||
- name: Expose deployment as a service
|
||||
k8s:
|
||||
definition:
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mongodb
|
||||
namespace: "eom-{{ target_namespace }}"
|
||||
spec:
|
||||
selector:
|
||||
app: mongodb
|
||||
ports:
|
||||
- port: 8081
|
||||
name: mongodb-8081
|
||||
type: ClusterIP
|
||||
@@ -16,7 +16,7 @@
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
storageClassName: standard
|
||||
hostPath:
|
||||
path: "/data/store-0/eom/openldap-config"
|
||||
path: "/data/store-0/eom-{{ target_namespace }}/openldap-config"
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
@@ -60,7 +60,7 @@
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
storageClassName: standard
|
||||
hostPath:
|
||||
path: "/data/store-0/eom/openldap-data"
|
||||
path: "/data/store-0/eom-{{ target_namespace }}/openldap-data"
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
---
|
||||
# tasks file for deploy-reverse-proxy.yml
|
||||
- name: Create ConfigMap for httpd
|
||||
vars:
|
||||
httpd_server_name: "proxy.eom.dev"
|
||||
httpd_conf_extra:
|
||||
- httpd-auth.conf
|
||||
- httpd-proxy.conf
|
||||
- httpd-ssl.conf
|
||||
k8s:
|
||||
state: present
|
||||
api_version: v1
|
||||
@@ -9,7 +15,8 @@
|
||||
namespace: "eom-{{ target_namespace }}"
|
||||
definition:
|
||||
data:
|
||||
httpd.conf: "{{ lookup('file', 'proxy-httpd.conf') }}"
|
||||
httpd.conf: "{{ lookup('template', 'httpd.conf.j2') }}"
|
||||
httpd-auth.conf: "{{ lookup('template', 'httpd-auth.conf.j2') }}"
|
||||
httpd-proxy.conf: "{{ lookup('file', 'httpd-proxy.conf') }}"
|
||||
httpd-ssl.conf: "{{ lookup('file', 'httpd-ssl.conf') }}"
|
||||
mime.types: "{{ lookup('file', 'mime.types') }}"
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
---
|
||||
# tasks file for www
|
||||
- name: Create a config map for www
|
||||
vars:
|
||||
httpd_server_name: "www.eom.dev"
|
||||
httpd_conf_extra:
|
||||
- httpd-auth.conf
|
||||
k8s:
|
||||
state: present
|
||||
api_version: v1
|
||||
@@ -9,7 +13,8 @@
|
||||
namespace: "eom-{{ target_namespace }}"
|
||||
definition:
|
||||
data:
|
||||
httpd.conf: "{{ lookup('template', 'www-httpd.conf.j2') }}"
|
||||
httpd.conf: "{{ lookup('template', 'httpd.conf.j2') }}"
|
||||
httpd-auth.conf: "{{ lookup('template', 'httpd-auth.conf.j2') }}"
|
||||
mime.types: "{{ lookup('file', 'mime.types') }}"
|
||||
|
||||
- name: Create a deployment
|
||||
|
||||
Reference in New Issue
Block a user