v0.0.8
This commit is contained in:
parent
6948b9baa8
commit
abd86e10e6
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
*.tar.gz
|
6
eom.dev.yml
Normal file
6
eom.dev.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
- name: Deploy eom.dev one service at a time
|
||||||
|
hosts: alpha-control-plane
|
||||||
|
become: true
|
||||||
|
roles:
|
||||||
|
- role: ericomeehan.eom.dev
|
8
files/motd
Normal file
8
files/motd
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
.-. .-._.. .-. .-.
|
||||||
|
./.-'_( ) )/ ) )
|
||||||
|
(__.' `-' '/ / (
|
||||||
|
`-'
|
||||||
|
|
||||||
|
|
10
gondwanamc.com.yml
Normal file
10
gondwanamc.com.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
- name: Deploy gondwanamc.com
|
||||||
|
hosts: alpha-control-plane
|
||||||
|
become: true
|
||||||
|
roles:
|
||||||
|
- role: ericomeehan.gondwanamc.com
|
||||||
|
vars:
|
||||||
|
target_namespace: testing
|
||||||
|
nodePorts:
|
||||||
|
gondwanamc-24454: 30000
|
||||||
|
gondwanamc-25565: 30001
|
@ -1,3 +1,3 @@
|
|||||||
---
|
---
|
||||||
# Global defaults
|
# Global defaults
|
||||||
nvidia: false
|
nvidia_driver_needed: false
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
---
|
---
|
||||||
# Host vars for alpha-worker-0
|
# Host vars for alpha-worker-0
|
||||||
nvidia: true
|
nvidia_driver_needed: true
|
||||||
|
nvidia_driver_tesla: true
|
||||||
|
@ -8,12 +8,8 @@ all:
|
|||||||
control_plane:
|
control_plane:
|
||||||
hosts:
|
hosts:
|
||||||
alpha-control-plane:
|
alpha-control-plane:
|
||||||
ansible-host: 192.168.1.116
|
ansible-host: 192.168.1.121
|
||||||
workers:
|
workers:
|
||||||
hosts:
|
hosts:
|
||||||
alpha-worker-0:
|
alpha-worker-0:
|
||||||
ansible-host: 192.168.1.125
|
ansible-host: 192.168.1.122
|
||||||
workstations:
|
|
||||||
hosts:
|
|
||||||
mobile-command:
|
|
||||||
ansible-host: localhost
|
|
||||||
|
5
inventories/hosts
Normal file
5
inventories/hosts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
127.0.0.1 localhost
|
||||||
|
127.0.1.1 mobile-command.eom.dev mobile-command
|
||||||
|
|
||||||
|
192.168.1.116 alpha-control-plane.eom.dev alpha-control-plane
|
||||||
|
192.168.1.125 alpha-worker-0.eom.dev alpha-worker-0
|
8
localtest.yml
Normal file
8
localtest.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
- name: Test local development
|
||||||
|
hosts: mobile-command
|
||||||
|
become: true
|
||||||
|
tasks:
|
||||||
|
- name: Test
|
||||||
|
debug:
|
||||||
|
msg: This is a test
|
@ -1,8 +1,13 @@
|
|||||||
---
|
---
|
||||||
- name: Prepare cluster environments
|
- name: Prepare cluster environments
|
||||||
hosts: clusters
|
hosts: alpha-worker-0
|
||||||
become: true
|
become: true
|
||||||
roles:
|
roles:
|
||||||
- role: nvidia.nvidia_driver
|
- role: nvidia.nvidia_driver
|
||||||
when:
|
vars:
|
||||||
- nvidia == true
|
nvidia_driver_ubuntu_cuda_repo_baseurl: 'https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64' # enforced 'debian11'
|
||||||
|
nvidia_driver_ubuntu_install_from_cuda_repo: yes
|
||||||
|
nvidia_driver_persistence_mode_on: yes
|
||||||
|
nvidia_driver_branch: "555"
|
||||||
|
nvidia_driver_ubuntu_cuda_keyring_package: "cuda-keyring_1.1-1_all.deb"
|
||||||
|
ansible_distribution: Ubuntu # forcing in to the ubuntu part of the role
|
||||||
|
2
roles/ericomeehan.cluster-gateway/defaults/main.yml
Normal file
2
roles/ericomeehan.cluster-gateway/defaults/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
# defaults file for ericomeehan.cluster-gateway
|
2
roles/ericomeehan.cluster-gateway/handlers/main.yml
Normal file
2
roles/ericomeehan.cluster-gateway/handlers/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
# handlers file for ericomeehan.cluster-gateway
|
104
roles/ericomeehan.cluster-gateway/tasks/main.yml
Normal file
104
roles/ericomeehan.cluster-gateway/tasks/main.yml
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
---
|
||||||
|
# tasks file for ericomeehan.cluster-gateway
|
||||||
|
- name: Create persistent volume for gateway
|
||||||
|
k8s:
|
||||||
|
state: present
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: gateway-pv
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: {{ gateway_storage }}
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
persistentVolumeReclaimPolicy: Retain
|
||||||
|
storageClassName: standard
|
||||||
|
hostPath:
|
||||||
|
path: /mnt/data/pv.gateway.eom.dev
|
||||||
|
nodeAffinity:
|
||||||
|
required:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: kubernetes.io/hostname
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- alpha-worker-0
|
||||||
|
|
||||||
|
- name: Create persistent volume claim for gateway
|
||||||
|
k8s:
|
||||||
|
state: present
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: pv-claim.gateway.eom.dev
|
||||||
|
namespace: {{ namespace }}
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ gateway_storage }}
|
||||||
|
storageClassName: standard
|
||||||
|
volumeName: pv.gateway.eom.dev
|
||||||
|
|
||||||
|
- name: Create a deployment
|
||||||
|
k8s:
|
||||||
|
definition:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: deployment.gateway.eom.dev
|
||||||
|
namespace: {{ namespace }}
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: eom.dev
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: eom.dev
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: gateway
|
||||||
|
image: gateway
|
||||||
|
volumeMounts:
|
||||||
|
- name: pv.gateway.eom.dev
|
||||||
|
mountPath: /usr/src/gateway/files
|
||||||
|
ports:
|
||||||
|
- containerPort: 3000
|
||||||
|
env:
|
||||||
|
- name: REDMINE_DB_MYSQL
|
||||||
|
value: "mariadb"
|
||||||
|
- name: REDMINE_DB_PORT
|
||||||
|
value: "8086"
|
||||||
|
- name: REDMINE_DB_DATABASE
|
||||||
|
value: "gateway"
|
||||||
|
- name: REDMINE_DB_USERNAME
|
||||||
|
value: "gateway"
|
||||||
|
- name: REDMINE_DB_PASSWORD
|
||||||
|
value: "{{ gateway_db_password }}"
|
||||||
|
volumes:
|
||||||
|
- name: pv.gateway.eom.dev
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: pv-claim.gateway.eom.dev
|
||||||
|
|
||||||
|
- name: Expose deployment as a service
|
||||||
|
k8s:
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: service.gateway.eom.dev
|
||||||
|
namespace: {{ namespace }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: eom.dev
|
||||||
|
ports:
|
||||||
|
- port: 3000
|
||||||
|
protocol: TCP
|
||||||
|
name: gateway-port-3000
|
||||||
|
type: ClusterIP
|
5
roles/ericomeehan.cluster-gateway/tests/test.yml
Normal file
5
roles/ericomeehan.cluster-gateway/tests/test.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
- hosts: localhost
|
||||||
|
remote_user: root
|
||||||
|
roles:
|
||||||
|
- ericomeehan.cluster-gateway
|
2
roles/ericomeehan.cluster-gateway/vars/main.yml
Normal file
2
roles/ericomeehan.cluster-gateway/vars/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
# vars file for ericomeehan.cluster-gateway
|
38
roles/ericomeehan.eom.dev/README.md
Normal file
38
roles/ericomeehan.eom.dev/README.md
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
Role Name
|
||||||
|
=========
|
||||||
|
|
||||||
|
A brief description of the role goes here.
|
||||||
|
|
||||||
|
Requirements
|
||||||
|
------------
|
||||||
|
|
||||||
|
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
|
||||||
|
|
||||||
|
Role Variables
|
||||||
|
--------------
|
||||||
|
|
||||||
|
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
|
||||||
|
|
||||||
|
Dependencies
|
||||||
|
------------
|
||||||
|
|
||||||
|
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
|
||||||
|
|
||||||
|
Example Playbook
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
|
||||||
|
|
||||||
|
- hosts: servers
|
||||||
|
roles:
|
||||||
|
- { role: username.rolename, x: 42 }
|
||||||
|
|
||||||
|
License
|
||||||
|
-------
|
||||||
|
|
||||||
|
BSD
|
||||||
|
|
||||||
|
Author Information
|
||||||
|
------------------
|
||||||
|
|
||||||
|
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
|
15
roles/ericomeehan.eom.dev/defaults/main.yml
Normal file
15
roles/ericomeehan.eom.dev/defaults/main.yml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
# defaults file for ericomeehan.org-suite
|
||||||
|
reverse_proxy_production_storage: 2Gi
|
||||||
|
mariadb_production_storage: 64Gi
|
||||||
|
gitea_production_storage: 64Gi
|
||||||
|
mediawiki_production_storage: 256Gi
|
||||||
|
nextcloud_production_storage: 256Gi
|
||||||
|
redmine_production_storage: 64Gi
|
||||||
|
|
||||||
|
# TODO: use ansible vault
|
||||||
|
mariadb_root_password: 123abc
|
||||||
|
gitea_mariadb_password: 123abc
|
||||||
|
mediawiki_mariadb_password: 123abc
|
||||||
|
nextcloud_mariadb_password: 123abc
|
||||||
|
redmine_mariadb_password: 123abc
|
33
roles/ericomeehan.eom.dev/files/cert.pem
Normal file
33
roles/ericomeehan.eom.dev/files/cert.pem
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
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
|
||||||
|
AxBtPNVdqb5+SZQkElQyNg2XFGlV
|
||||||
|
-----END CERTIFICATE-----
|
6
roles/ericomeehan.eom.dev/files/httpd-acme.conf
Normal file
6
roles/ericomeehan.eom.dev/files/httpd-acme.conf
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
Alias /.well-known/acme-challenge/ "/var/lib/letsencrypt/http_challenges/"
|
||||||
|
<Directory "/var/lib/letsencrypt/">
|
||||||
|
AllowOverride None
|
||||||
|
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
|
||||||
|
Require method GET POST OPTIONS
|
||||||
|
</Directory>
|
6
roles/ericomeehan.eom.dev/files/httpd-proxy.conf
Normal file
6
roles/ericomeehan.eom.dev/files/httpd-proxy.conf
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<VirtualHost *:443>
|
||||||
|
ServerName
|
||||||
|
ProxyPass / http:///
|
||||||
|
ProxyPassReverse / http:///
|
||||||
|
ProxyPreserveHost On
|
||||||
|
</VirtualHost>
|
290
roles/ericomeehan.eom.dev/files/httpd-ssl.conf
Normal file
290
roles/ericomeehan.eom.dev/files/httpd-ssl.conf
Normal file
@ -0,0 +1,290 @@
|
|||||||
|
#
|
||||||
|
# This is the Apache server configuration file providing SSL support.
|
||||||
|
# It contains the configuration directives to instruct the server how to
|
||||||
|
# serve pages over an https connection. For detailed information about these
|
||||||
|
# directives see <URL:http://httpd.apache.org/docs/2.4/mod/mod_ssl.html>
|
||||||
|
#
|
||||||
|
# Do NOT simply read the instructions in here without understanding
|
||||||
|
# what they do. They're here only as hints or reminders. If you are unsure
|
||||||
|
# consult the online docs. You have been warned.
|
||||||
|
#
|
||||||
|
# Required modules: mod_log_config, mod_setenvif, mod_ssl,
|
||||||
|
# socache_shmcb_module (for default value of SSLSessionCache)
|
||||||
|
|
||||||
|
#
|
||||||
|
# Pseudo Random Number Generator (PRNG):
|
||||||
|
# Configure one or more sources to seed the PRNG of the SSL library.
|
||||||
|
# The seed data should be of good random quality.
|
||||||
|
# WARNING! On some platforms /dev/random blocks if not enough entropy
|
||||||
|
# is available. This means you then cannot use the /dev/random device
|
||||||
|
# because it would lead to very long connection times (as long as
|
||||||
|
# it requires to make more entropy available). But usually those
|
||||||
|
# platforms additionally provide a /dev/urandom device which doesn't
|
||||||
|
# block. So, if available, use this one instead. Read the mod_ssl User
|
||||||
|
# Manual for more details.
|
||||||
|
#
|
||||||
|
#SSLRandomSeed startup file:/dev/random 512
|
||||||
|
#SSLRandomSeed startup file:/dev/urandom 512
|
||||||
|
#SSLRandomSeed connect file:/dev/random 512
|
||||||
|
#SSLRandomSeed connect file:/dev/urandom 512
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# When we also provide SSL we have to listen to the
|
||||||
|
# standard HTTP port (see above) and to the HTTPS port
|
||||||
|
#
|
||||||
|
Listen 443
|
||||||
|
|
||||||
|
##
|
||||||
|
## SSL Global Context
|
||||||
|
##
|
||||||
|
## All SSL configuration in this context applies both to
|
||||||
|
## the main server and all SSL-enabled virtual hosts.
|
||||||
|
##
|
||||||
|
|
||||||
|
# SSL Cipher Suite:
|
||||||
|
# List the ciphers that the client is permitted to negotiate,
|
||||||
|
# and that httpd will negotiate as the client of a proxied server.
|
||||||
|
# See the OpenSSL documentation for a complete list of ciphers, and
|
||||||
|
# ensure these follow appropriate best practices for this deployment.
|
||||||
|
# httpd 2.2.30, 2.4.13 and later force-disable aNULL, eNULL and EXP ciphers,
|
||||||
|
# while OpenSSL disabled these by default in 0.9.8zf/1.0.0r/1.0.1m/1.0.2a.
|
||||||
|
SSLCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES
|
||||||
|
SSLProxyCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES
|
||||||
|
|
||||||
|
# By the end of 2016, only TLSv1.2 ciphers should remain in use.
|
||||||
|
# Older ciphers should be disallowed as soon as possible, while the
|
||||||
|
# kRSA ciphers do not offer forward secrecy. These changes inhibit
|
||||||
|
# older clients (such as IE6 SP2 or IE8 on Windows XP, or other legacy
|
||||||
|
# non-browser tooling) from successfully connecting.
|
||||||
|
#
|
||||||
|
# To restrict mod_ssl to use only TLSv1.2 ciphers, and disable
|
||||||
|
# those protocols which do not support forward secrecy, replace
|
||||||
|
# the SSLCipherSuite and SSLProxyCipherSuite directives above with
|
||||||
|
# the following two directives, as soon as practical.
|
||||||
|
# SSLCipherSuite HIGH:MEDIUM:!SSLv3:!kRSA
|
||||||
|
# SSLProxyCipherSuite HIGH:MEDIUM:!SSLv3:!kRSA
|
||||||
|
|
||||||
|
# User agents such as web browsers are not configured for the user's
|
||||||
|
# own preference of either security or performance, therefore this
|
||||||
|
# must be the prerogative of the web server administrator who manages
|
||||||
|
# cpu load versus confidentiality, so enforce the server's cipher order.
|
||||||
|
SSLHonorCipherOrder on
|
||||||
|
|
||||||
|
# SSL Protocol support:
|
||||||
|
# List the protocol versions which clients are allowed to connect with.
|
||||||
|
# Disable SSLv3 by default (cf. RFC 7525 3.1.1). TLSv1 (1.0) should be
|
||||||
|
# disabled as quickly as practical. By the end of 2016, only the TLSv1.2
|
||||||
|
# protocol or later should remain in use.
|
||||||
|
SSLProtocol all -SSLv3
|
||||||
|
SSLProxyProtocol all -SSLv3
|
||||||
|
|
||||||
|
# Pass Phrase Dialog:
|
||||||
|
# Configure the pass phrase gathering process.
|
||||||
|
# The filtering dialog program (`builtin' is an internal
|
||||||
|
# terminal dialog) has to provide the pass phrase on stdout.
|
||||||
|
SSLPassPhraseDialog builtin
|
||||||
|
|
||||||
|
# Inter-Process Session Cache:
|
||||||
|
# Configure the SSL Session Cache: First the mechanism
|
||||||
|
# to use and second the expiring timeout (in seconds).
|
||||||
|
#SSLSessionCache "dbm:/usr/local/apache2/logs/ssl_scache"
|
||||||
|
SSLSessionCache "shmcb:/usr/local/apache2/logs/ssl_scache(512000)"
|
||||||
|
SSLSessionCacheTimeout 300
|
||||||
|
|
||||||
|
# OCSP Stapling (requires OpenSSL 0.9.8h or later)
|
||||||
|
#
|
||||||
|
# This feature is disabled by default and requires at least
|
||||||
|
# the two directives SSLUseStapling and SSLStaplingCache.
|
||||||
|
# Refer to the documentation on OCSP Stapling in the SSL/TLS
|
||||||
|
# How-To for more information.
|
||||||
|
#
|
||||||
|
# Enable stapling for all SSL-enabled servers:
|
||||||
|
#SSLUseStapling On
|
||||||
|
|
||||||
|
# Define a relatively small cache for OCSP Stapling using
|
||||||
|
# the same mechanism that is used for the SSL session cache
|
||||||
|
# above. If stapling is used with more than a few certificates,
|
||||||
|
# the size may need to be increased. (AH01929 will be logged.)
|
||||||
|
#SSLStaplingCache "shmcb:/usr/local/apache2/logs/ssl_stapling(32768)"
|
||||||
|
|
||||||
|
# Seconds before valid OCSP responses are expired from the cache
|
||||||
|
#SSLStaplingStandardCacheTimeout 3600
|
||||||
|
|
||||||
|
# Seconds before invalid OCSP responses are expired from the cache
|
||||||
|
#SSLStaplingErrorCacheTimeout 600
|
||||||
|
|
||||||
|
##
|
||||||
|
## SSL Virtual Host Context
|
||||||
|
##
|
||||||
|
|
||||||
|
<VirtualHost _default_:443>
|
||||||
|
|
||||||
|
# General setup for the virtual host
|
||||||
|
DocumentRoot "/usr/local/apache2/htdocs"
|
||||||
|
ServerName www.example.com:443
|
||||||
|
ServerAdmin you@example.com
|
||||||
|
ErrorLog /proc/self/fd/2
|
||||||
|
TransferLog /proc/self/fd/1
|
||||||
|
|
||||||
|
# SSL Engine Switch:
|
||||||
|
# Enable/Disable SSL for this virtual host.
|
||||||
|
SSLEngine on
|
||||||
|
|
||||||
|
# Server Certificate:
|
||||||
|
# Point SSLCertificateFile at a PEM encoded certificate. If
|
||||||
|
# the certificate is encrypted, then you will be prompted for a
|
||||||
|
# pass phrase. Note that a kill -HUP will prompt again. Keep
|
||||||
|
# in mind that if you have both an RSA and a DSA certificate you
|
||||||
|
# can configure both in parallel (to also allow the use of DSA
|
||||||
|
# ciphers, etc.)
|
||||||
|
# Some ECC cipher suites (http://www.ietf.org/rfc/rfc4492.txt)
|
||||||
|
# require an ECC certificate which can also be configured in
|
||||||
|
# parallel.
|
||||||
|
SSLCertificateFile "/usr/local/apache2/conf/server.crt"
|
||||||
|
#SSLCertificateFile "/usr/local/apache2/conf/server-dsa.crt"
|
||||||
|
#SSLCertificateFile "/usr/local/apache2/conf/server-ecc.crt"
|
||||||
|
|
||||||
|
# Server Private Key:
|
||||||
|
# If the key is not combined with the certificate, use this
|
||||||
|
# directive to point at the key file. Keep in mind that if
|
||||||
|
# you've both a RSA and a DSA private key you can configure
|
||||||
|
# both in parallel (to also allow the use of DSA ciphers, etc.)
|
||||||
|
# ECC keys, when in use, can also be configured in parallel
|
||||||
|
SSLCertificateKeyFile "/usr/local/apache2/conf/server.key"
|
||||||
|
#SSLCertificateKeyFile "/usr/local/apache2/conf/server-dsa.key"
|
||||||
|
#SSLCertificateKeyFile "/usr/local/apache2/conf/server-ecc.key"
|
||||||
|
|
||||||
|
# Server Certificate Chain:
|
||||||
|
# Point SSLCertificateChainFile at a file containing the
|
||||||
|
# concatenation of PEM encoded CA certificates which form the
|
||||||
|
# certificate chain for the server certificate. Alternatively
|
||||||
|
# the referenced file can be the same as SSLCertificateFile
|
||||||
|
# when the CA certificates are directly appended to the server
|
||||||
|
# certificate for convenience.
|
||||||
|
#SSLCertificateChainFile "/usr/local/apache2/conf/server-ca.crt"
|
||||||
|
|
||||||
|
# Certificate Authority (CA):
|
||||||
|
# Set the CA certificate verification path where to find CA
|
||||||
|
# certificates for client authentication or alternatively one
|
||||||
|
# huge file containing all of them (file must be PEM encoded)
|
||||||
|
# Note: Inside SSLCACertificatePath you need hash symlinks
|
||||||
|
# to point to the certificate files. Use the provided
|
||||||
|
# Makefile to update the hash symlinks after changes.
|
||||||
|
#SSLCACertificatePath "/usr/local/apache2/conf/ssl.crt"
|
||||||
|
#SSLCACertificateFile "/usr/local/apache2/conf/ssl.crt/ca-bundle.crt"
|
||||||
|
|
||||||
|
# Certificate Revocation Lists (CRL):
|
||||||
|
# Set the CA revocation path where to find CA CRLs for client
|
||||||
|
# authentication or alternatively one huge file containing all
|
||||||
|
# of them (file must be PEM encoded).
|
||||||
|
# The CRL checking mode needs to be configured explicitly
|
||||||
|
# through SSLCARevocationCheck (defaults to "none" otherwise).
|
||||||
|
# Note: Inside SSLCARevocationPath you need hash symlinks
|
||||||
|
# to point to the certificate files. Use the provided
|
||||||
|
# Makefile to update the hash symlinks after changes.
|
||||||
|
#SSLCARevocationPath "/usr/local/apache2/conf/ssl.crl"
|
||||||
|
#SSLCARevocationFile "/usr/local/apache2/conf/ssl.crl/ca-bundle.crl"
|
||||||
|
#SSLCARevocationCheck chain
|
||||||
|
|
||||||
|
# Client Authentication (Type):
|
||||||
|
# Client certificate verification type and depth. Types are
|
||||||
|
# none, optional, require and optional_no_ca. Depth is a
|
||||||
|
# number which specifies how deeply to verify the certificate
|
||||||
|
# issuer chain before deciding the certificate is not valid.
|
||||||
|
#SSLVerifyClient require
|
||||||
|
#SSLVerifyDepth 10
|
||||||
|
|
||||||
|
# TLS-SRP mutual authentication:
|
||||||
|
# Enable TLS-SRP and set the path to the OpenSSL SRP verifier
|
||||||
|
# file (containing login information for SRP user accounts).
|
||||||
|
# Requires OpenSSL 1.0.1 or newer. See the mod_ssl FAQ for
|
||||||
|
# detailed instructions on creating this file. Example:
|
||||||
|
# "openssl srp -srpvfile /usr/local/apache2/conf/passwd.srpv -add username"
|
||||||
|
#SSLSRPVerifierFile "/usr/local/apache2/conf/passwd.srpv"
|
||||||
|
|
||||||
|
# Access Control:
|
||||||
|
# With SSLRequire you can do per-directory access control based
|
||||||
|
# on arbitrary complex boolean expressions containing server
|
||||||
|
# variable checks and other lookup directives. The syntax is a
|
||||||
|
# mixture between C and Perl. See the mod_ssl documentation
|
||||||
|
# for more details.
|
||||||
|
#<Location />
|
||||||
|
#SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
|
||||||
|
# and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
|
||||||
|
# and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
|
||||||
|
# and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
|
||||||
|
# and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \
|
||||||
|
# or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
|
||||||
|
#</Location>
|
||||||
|
|
||||||
|
# SSL Engine Options:
|
||||||
|
# Set various options for the SSL engine.
|
||||||
|
# o FakeBasicAuth:
|
||||||
|
# Translate the client X.509 into a Basic Authorisation. This means that
|
||||||
|
# the standard Auth/DBMAuth methods can be used for access control. The
|
||||||
|
# user name is the `one line' version of the client's X.509 certificate.
|
||||||
|
# Note that no password is obtained from the user. Every entry in the user
|
||||||
|
# file needs this password: `xxj31ZMTZzkVA'.
|
||||||
|
# o ExportCertData:
|
||||||
|
# This exports two additional environment variables: SSL_CLIENT_CERT and
|
||||||
|
# SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
|
||||||
|
# server (always existing) and the client (only existing when client
|
||||||
|
# authentication is used). This can be used to import the certificates
|
||||||
|
# into CGI scripts.
|
||||||
|
# o StdEnvVars:
|
||||||
|
# This exports the standard SSL/TLS related `SSL_*' environment variables.
|
||||||
|
# Per default this exportation is switched off for performance reasons,
|
||||||
|
# because the extraction step is an expensive operation and is usually
|
||||||
|
# useless for serving static content. So one usually enables the
|
||||||
|
# exportation for CGI and SSI requests only.
|
||||||
|
# o StrictRequire:
|
||||||
|
# This denies access when "SSLRequireSSL" or "SSLRequire" applied even
|
||||||
|
# under a "Satisfy any" situation, i.e. when it applies access is denied
|
||||||
|
# and no other module can change it.
|
||||||
|
# o OptRenegotiate:
|
||||||
|
# This enables optimized SSL connection renegotiation handling when SSL
|
||||||
|
# directives are used in per-directory context.
|
||||||
|
#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
|
||||||
|
<FilesMatch "\.(cgi|shtml|phtml|php)$">
|
||||||
|
SSLOptions +StdEnvVars
|
||||||
|
</FilesMatch>
|
||||||
|
<Directory "/usr/local/apache2/cgi-bin">
|
||||||
|
SSLOptions +StdEnvVars
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
# SSL Protocol Adjustments:
|
||||||
|
# The safe and default but still SSL/TLS standard compliant shutdown
|
||||||
|
# approach is that mod_ssl sends the close notify alert but doesn't wait for
|
||||||
|
# the close notify alert from client. When you need a different shutdown
|
||||||
|
# approach you can use one of the following variables:
|
||||||
|
# o ssl-unclean-shutdown:
|
||||||
|
# This forces an unclean shutdown when the connection is closed, i.e. no
|
||||||
|
# SSL close notify alert is sent or allowed to be received. This violates
|
||||||
|
# the SSL/TLS standard but is needed for some brain-dead browsers. Use
|
||||||
|
# this when you receive I/O errors because of the standard approach where
|
||||||
|
# mod_ssl sends the close notify alert.
|
||||||
|
# o ssl-accurate-shutdown:
|
||||||
|
# This forces an accurate shutdown when the connection is closed, i.e. a
|
||||||
|
# SSL close notify alert is send and mod_ssl waits for the close notify
|
||||||
|
# alert of the client. This is 100% SSL/TLS standard compliant, but in
|
||||||
|
# practice often causes hanging connections with brain-dead browsers. Use
|
||||||
|
# this only for browsers where you know that their SSL implementation
|
||||||
|
# works correctly.
|
||||||
|
# Notice: Most problems of broken clients are also related to the HTTP
|
||||||
|
# keep-alive facility, so you usually additionally want to disable
|
||||||
|
# keep-alive for those clients, too. Use variable "nokeepalive" for this.
|
||||||
|
# Similarly, one has to force some clients to use HTTP/1.0 to workaround
|
||||||
|
# their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
|
||||||
|
# "force-response-1.0" for this.
|
||||||
|
BrowserMatch "MSIE [2-5]" \
|
||||||
|
nokeepalive ssl-unclean-shutdown \
|
||||||
|
downgrade-1.0 force-response-1.0
|
||||||
|
|
||||||
|
# Per-Server Logging:
|
||||||
|
# The home of a custom SSL log file. Use this when you want a
|
||||||
|
# compact non-error SSL logfile on a virtual host basis.
|
||||||
|
CustomLog /proc/self/fd/1 \
|
||||||
|
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
|
||||||
|
|
||||||
|
</VirtualHost>
|
41
roles/ericomeehan.eom.dev/files/httpd-vhosts.conf
Normal file
41
roles/ericomeehan.eom.dev/files/httpd-vhosts.conf
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
# Virtual Hosts
|
||||||
|
#
|
||||||
|
# Required modules: mod_log_config
|
||||||
|
|
||||||
|
# If you want to maintain multiple domains/hostnames on your
|
||||||
|
# machine you can setup VirtualHost containers for them. Most configurations
|
||||||
|
# use only name-based virtual hosts so the server doesn't need to worry about
|
||||||
|
# IP addresses. This is indicated by the asterisks in the directives below.
|
||||||
|
#
|
||||||
|
# Please see the documentation at
|
||||||
|
# <URL:http://httpd.apache.org/docs/2.4/vhosts/>
|
||||||
|
# for further details before you try to setup virtual hosts.
|
||||||
|
#
|
||||||
|
# You may use the command line option '-S' to verify your virtual host
|
||||||
|
# configuration.
|
||||||
|
|
||||||
|
#
|
||||||
|
# VirtualHost example:
|
||||||
|
# Almost any Apache directive may go into a VirtualHost container.
|
||||||
|
# The first VirtualHost section is used for all requests that do not
|
||||||
|
# match a ServerName or ServerAlias in any <VirtualHost> block.
|
||||||
|
#
|
||||||
|
<VirtualHost *:80>
|
||||||
|
ServerAdmin admin@{{ subdomain }}.{{ netname }}
|
||||||
|
DocumentRoot "/etc/httpd/docs/{{ subdomain }}.{{ netname }}"
|
||||||
|
ServerName {{ subdomain }}.{{ netname }}
|
||||||
|
ServerAlias www.{{ subdomain }}.{{ netname }}
|
||||||
|
ErrorLog "/var/log/httpd/{{ subdomain }}.{{ netname }}-error_log"
|
||||||
|
CustomLog "/var/log/httpd/{{ subdomain }}.{{ netname }}-access_log" common
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
|
<VirtualHost *:443>
|
||||||
|
ServerAdmin admin@{{ subdomain }}.{{ netname }}
|
||||||
|
DocumentRoot "/etc/httpd/docs/{{ subdomain }}.{{ netname }}"
|
||||||
|
ServerName {{ subdomain }}.{{ netname }}
|
||||||
|
ErrorLog "/var/log/httpd/{{ subdomain }}.{{ netname }}-error_log"
|
||||||
|
CustomLog "/var/log/httpd/{{ subdomain }}.{{ netname }}-access_log" common
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
|
|
||||||
|
|
618
roles/ericomeehan.eom.dev/files/httpd.conf
Normal file
618
roles/ericomeehan.eom.dev/files/httpd.conf
Normal file
@ -0,0 +1,618 @@
|
|||||||
|
#
|
||||||
|
# This is the main Apache HTTP server configuration file. It contains the
|
||||||
|
# configuration directives that give the server its instructions.
|
||||||
|
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
|
||||||
|
# In particular, see
|
||||||
|
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
|
||||||
|
# for a discussion of each configuration directive.
|
||||||
|
#
|
||||||
|
# Do NOT simply read the instructions in here without understanding
|
||||||
|
# what they do. They're here only as hints or reminders. If you are unsure
|
||||||
|
# consult the online docs. You have been warned.
|
||||||
|
#
|
||||||
|
# Configuration and logfile names: If the filenames you specify for many
|
||||||
|
# of the server's control files begin with "/" (or "drive:/" for Win32), the
|
||||||
|
# server will use that explicit path. If the filenames do *not* begin
|
||||||
|
# with "/", the value of ServerRoot is prepended -- so "logs/access_log"
|
||||||
|
# with ServerRoot set to "/usr/local/apache2" will be interpreted by the
|
||||||
|
# server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log"
|
||||||
|
# will be interpreted as '/logs/access_log'.
|
||||||
|
|
||||||
|
#
|
||||||
|
# ServerRoot: The top of the directory tree under which the server's
|
||||||
|
# configuration, error, and log files are kept.
|
||||||
|
#
|
||||||
|
# Do not add a slash at the end of the directory path. If you point
|
||||||
|
# ServerRoot at a non-local disk, be sure to specify a local disk on the
|
||||||
|
# Mutex directive, if file-based mutexes are used. If you wish to share the
|
||||||
|
# same ServerRoot for multiple httpd daemons, you will need to change at
|
||||||
|
# least PidFile.
|
||||||
|
#
|
||||||
|
ServerRoot "/usr/local/apache2"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Mutex: Allows you to set the mutex mechanism and mutex file directory
|
||||||
|
# for individual mutexes, or change the global defaults
|
||||||
|
#
|
||||||
|
# Uncomment and change the directory if mutexes are file-based and the default
|
||||||
|
# mutex file directory is not on a local disk or is not appropriate for some
|
||||||
|
# other reason.
|
||||||
|
#
|
||||||
|
# Mutex default:logs
|
||||||
|
|
||||||
|
#
|
||||||
|
# Listen: Allows you to bind Apache to specific IP addresses and/or
|
||||||
|
# ports, instead of the default. See also the <VirtualHost>
|
||||||
|
# directive.
|
||||||
|
#
|
||||||
|
# Change this to Listen on specific IP addresses as shown below to
|
||||||
|
# prevent Apache from glomming onto all bound IP addresses.
|
||||||
|
#
|
||||||
|
#Listen 12.34.56.78:80
|
||||||
|
Listen 80
|
||||||
|
|
||||||
|
#
|
||||||
|
# Dynamic Shared Object (DSO) Support
|
||||||
|
#
|
||||||
|
# To be able to use the functionality of a module which was built as a DSO you
|
||||||
|
# have to place corresponding `LoadModule' lines at this location so the
|
||||||
|
# directives contained in it are actually available _before_ they are used.
|
||||||
|
# Statically compiled modules (those listed by `httpd -l') do not need
|
||||||
|
# to be loaded here.
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# LoadModule foo_module modules/mod_foo.so
|
||||||
|
#
|
||||||
|
LoadModule mpm_event_module modules/mod_mpm_event.so
|
||||||
|
#LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
|
||||||
|
#LoadModule mpm_worker_module modules/mod_mpm_worker.so
|
||||||
|
LoadModule authn_file_module modules/mod_authn_file.so
|
||||||
|
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
|
||||||
|
#LoadModule authn_anon_module modules/mod_authn_anon.so
|
||||||
|
#LoadModule authn_dbd_module modules/mod_authn_dbd.so
|
||||||
|
#LoadModule authn_socache_module modules/mod_authn_socache.so
|
||||||
|
LoadModule authn_core_module modules/mod_authn_core.so
|
||||||
|
LoadModule authz_host_module modules/mod_authz_host.so
|
||||||
|
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
|
||||||
|
LoadModule authz_user_module modules/mod_authz_user.so
|
||||||
|
#LoadModule authz_dbm_module modules/mod_authz_dbm.so
|
||||||
|
#LoadModule authz_owner_module modules/mod_authz_owner.so
|
||||||
|
#LoadModule authz_dbd_module modules/mod_authz_dbd.so
|
||||||
|
LoadModule authz_core_module modules/mod_authz_core.so
|
||||||
|
#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
|
||||||
|
#LoadModule authnz_fcgi_module modules/mod_authnz_fcgi.so
|
||||||
|
LoadModule access_compat_module modules/mod_access_compat.so
|
||||||
|
LoadModule auth_basic_module modules/mod_auth_basic.so
|
||||||
|
#LoadModule auth_form_module modules/mod_auth_form.so
|
||||||
|
#LoadModule auth_digest_module modules/mod_auth_digest.so
|
||||||
|
#LoadModule allowmethods_module modules/mod_allowmethods.so
|
||||||
|
#LoadModule isapi_module modules/mod_isapi.so
|
||||||
|
#LoadModule file_cache_module modules/mod_file_cache.so
|
||||||
|
#LoadModule cache_module modules/mod_cache.so
|
||||||
|
#LoadModule cache_disk_module modules/mod_cache_disk.so
|
||||||
|
#LoadModule cache_socache_module modules/mod_cache_socache.so
|
||||||
|
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
|
||||||
|
#LoadModule socache_dbm_module modules/mod_socache_dbm.so
|
||||||
|
#LoadModule socache_memcache_module modules/mod_socache_memcache.so
|
||||||
|
#LoadModule socache_redis_module modules/mod_socache_redis.so
|
||||||
|
#LoadModule watchdog_module modules/mod_watchdog.so
|
||||||
|
#LoadModule macro_module modules/mod_macro.so
|
||||||
|
#LoadModule dbd_module modules/mod_dbd.so
|
||||||
|
#LoadModule bucketeer_module modules/mod_bucketeer.so
|
||||||
|
#LoadModule dumpio_module modules/mod_dumpio.so
|
||||||
|
#LoadModule echo_module modules/mod_echo.so
|
||||||
|
#LoadModule example_hooks_module modules/mod_example_hooks.so
|
||||||
|
#LoadModule case_filter_module modules/mod_case_filter.so
|
||||||
|
#LoadModule case_filter_in_module modules/mod_case_filter_in.so
|
||||||
|
#LoadModule example_ipc_module modules/mod_example_ipc.so
|
||||||
|
#LoadModule buffer_module modules/mod_buffer.so
|
||||||
|
#LoadModule data_module modules/mod_data.so
|
||||||
|
#LoadModule ratelimit_module modules/mod_ratelimit.so
|
||||||
|
LoadModule reqtimeout_module modules/mod_reqtimeout.so
|
||||||
|
#LoadModule ext_filter_module modules/mod_ext_filter.so
|
||||||
|
#LoadModule request_module modules/mod_request.so
|
||||||
|
#LoadModule include_module modules/mod_include.so
|
||||||
|
LoadModule filter_module modules/mod_filter.so
|
||||||
|
#LoadModule reflector_module modules/mod_reflector.so
|
||||||
|
#LoadModule substitute_module modules/mod_substitute.so
|
||||||
|
#LoadModule sed_module modules/mod_sed.so
|
||||||
|
#LoadModule charset_lite_module modules/mod_charset_lite.so
|
||||||
|
#LoadModule deflate_module modules/mod_deflate.so
|
||||||
|
#LoadModule xml2enc_module modules/mod_xml2enc.so
|
||||||
|
#LoadModule proxy_html_module modules/mod_proxy_html.so
|
||||||
|
#LoadModule brotli_module modules/mod_brotli.so
|
||||||
|
LoadModule mime_module modules/mod_mime.so
|
||||||
|
#LoadModule ldap_module modules/mod_ldap.so
|
||||||
|
LoadModule log_config_module modules/mod_log_config.so
|
||||||
|
#LoadModule log_debug_module modules/mod_log_debug.so
|
||||||
|
#LoadModule log_forensic_module modules/mod_log_forensic.so
|
||||||
|
#LoadModule logio_module modules/mod_logio.so
|
||||||
|
#LoadModule lua_module modules/mod_lua.so
|
||||||
|
LoadModule env_module modules/mod_env.so
|
||||||
|
#LoadModule mime_magic_module modules/mod_mime_magic.so
|
||||||
|
#LoadModule cern_meta_module modules/mod_cern_meta.so
|
||||||
|
#LoadModule expires_module modules/mod_expires.so
|
||||||
|
LoadModule headers_module modules/mod_headers.so
|
||||||
|
#LoadModule ident_module modules/mod_ident.so
|
||||||
|
#LoadModule usertrack_module modules/mod_usertrack.so
|
||||||
|
#LoadModule unique_id_module modules/mod_unique_id.so
|
||||||
|
LoadModule setenvif_module modules/mod_setenvif.so
|
||||||
|
LoadModule version_module modules/mod_version.so
|
||||||
|
#LoadModule remoteip_module modules/mod_remoteip.so
|
||||||
|
LoadModule proxy_module modules/mod_proxy.so
|
||||||
|
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
|
||||||
|
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
|
||||||
|
LoadModule proxy_http_module modules/mod_proxy_http.so
|
||||||
|
#LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
|
||||||
|
#LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
|
||||||
|
#LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so
|
||||||
|
#LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so
|
||||||
|
#LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
|
||||||
|
#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
|
||||||
|
#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
|
||||||
|
#LoadModule proxy_express_module modules/mod_proxy_express.so
|
||||||
|
#LoadModule proxy_hcheck_module modules/mod_proxy_hcheck.so
|
||||||
|
#LoadModule session_module modules/mod_session.so
|
||||||
|
#LoadModule session_cookie_module modules/mod_session_cookie.so
|
||||||
|
#LoadModule session_crypto_module modules/mod_session_crypto.so
|
||||||
|
#LoadModule session_dbd_module modules/mod_session_dbd.so
|
||||||
|
#LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
|
||||||
|
#LoadModule slotmem_plain_module modules/mod_slotmem_plain.so
|
||||||
|
LoadModule ssl_module modules/mod_ssl.so
|
||||||
|
#LoadModule optional_hook_export_module modules/mod_optional_hook_export.so
|
||||||
|
#LoadModule optional_hook_import_module modules/mod_optional_hook_import.so
|
||||||
|
#LoadModule optional_fn_import_module modules/mod_optional_fn_import.so
|
||||||
|
#LoadModule optional_fn_export_module modules/mod_optional_fn_export.so
|
||||||
|
#LoadModule dialup_module modules/mod_dialup.so
|
||||||
|
#LoadModule http2_module modules/mod_http2.so
|
||||||
|
#LoadModule proxy_http2_module modules/mod_proxy_http2.so
|
||||||
|
#LoadModule md_module modules/mod_md.so
|
||||||
|
#LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
|
||||||
|
#LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so
|
||||||
|
#LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so
|
||||||
|
#LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so
|
||||||
|
LoadModule unixd_module modules/mod_unixd.so
|
||||||
|
#LoadModule heartbeat_module modules/mod_heartbeat.so
|
||||||
|
#LoadModule heartmonitor_module modules/mod_heartmonitor.so
|
||||||
|
#LoadModule dav_module modules/mod_dav.so
|
||||||
|
LoadModule status_module modules/mod_status.so
|
||||||
|
LoadModule autoindex_module modules/mod_autoindex.so
|
||||||
|
#LoadModule asis_module modules/mod_asis.so
|
||||||
|
#LoadModule info_module modules/mod_info.so
|
||||||
|
#LoadModule suexec_module modules/mod_suexec.so
|
||||||
|
<IfModule !mpm_prefork_module>
|
||||||
|
#LoadModule cgid_module modules/mod_cgid.so
|
||||||
|
</IfModule>
|
||||||
|
<IfModule mpm_prefork_module>
|
||||||
|
#LoadModule cgi_module modules/mod_cgi.so
|
||||||
|
</IfModule>
|
||||||
|
#LoadModule dav_fs_module modules/mod_dav_fs.so
|
||||||
|
#LoadModule dav_lock_module modules/mod_dav_lock.so
|
||||||
|
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
|
||||||
|
#LoadModule negotiation_module modules/mod_negotiation.so
|
||||||
|
LoadModule dir_module modules/mod_dir.so
|
||||||
|
#LoadModule imagemap_module modules/mod_imagemap.so
|
||||||
|
#LoadModule actions_module modules/mod_actions.so
|
||||||
|
#LoadModule speling_module modules/mod_speling.so
|
||||||
|
#LoadModule userdir_module modules/mod_userdir.so
|
||||||
|
LoadModule alias_module modules/mod_alias.so
|
||||||
|
#LoadModule rewrite_module modules/mod_rewrite.so
|
||||||
|
|
||||||
|
<IfModule unixd_module>
|
||||||
|
#
|
||||||
|
# If you wish httpd to run as a different user or group, you must run
|
||||||
|
# httpd as root initially and it will switch.
|
||||||
|
#
|
||||||
|
# User/Group: The name (or #number) of the user/group to run httpd as.
|
||||||
|
# It is usually good practice to create a dedicated user and group for
|
||||||
|
# running httpd, as with most system services.
|
||||||
|
#
|
||||||
|
User www-data
|
||||||
|
Group www-data
|
||||||
|
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
# 'Main' server configuration
|
||||||
|
#
|
||||||
|
# The directives in this section set up the values used by the 'main'
|
||||||
|
# server, which responds to any requests that aren't handled by a
|
||||||
|
# <VirtualHost> definition. These values also provide defaults for
|
||||||
|
# any <VirtualHost> containers you may define later in the file.
|
||||||
|
#
|
||||||
|
# All of these directives may appear inside <VirtualHost> containers,
|
||||||
|
# in which case these default settings will be overridden for the
|
||||||
|
# virtual host being defined.
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# ServerAdmin: Your address, where problems with the server should be
|
||||||
|
# e-mailed. This address appears on some server-generated pages, such
|
||||||
|
# as error documents. e.g. admin@your-domain.com
|
||||||
|
#
|
||||||
|
ServerAdmin admin@eom.dev
|
||||||
|
|
||||||
|
#
|
||||||
|
# ServerName gives the name and port that the server uses to identify itself.
|
||||||
|
# This can often be determined automatically, but we recommend you specify
|
||||||
|
# it explicitly to prevent problems during startup.
|
||||||
|
#
|
||||||
|
# If your host doesn't have a registered DNS name, enter its IP address here.
|
||||||
|
#
|
||||||
|
#ServerName www.example.com:80
|
||||||
|
|
||||||
|
#
|
||||||
|
# Deny access to the entirety of your server's filesystem. You must
|
||||||
|
# explicitly permit access to web content directories in other
|
||||||
|
# <Directory> blocks below.
|
||||||
|
#
|
||||||
|
<Directory />
|
||||||
|
AllowOverride none
|
||||||
|
Require all denied
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
#
|
||||||
|
# Note that from this point forward you must specifically allow
|
||||||
|
# particular features to be enabled - so if something's not working as
|
||||||
|
# you might expect, make sure that you have specifically enabled it
|
||||||
|
# below.
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# DocumentRoot: The directory out of which you will serve your
|
||||||
|
# documents. By default, all requests are taken from this directory, but
|
||||||
|
# symbolic links and aliases may be used to point to other locations.
|
||||||
|
#
|
||||||
|
DocumentRoot "/usr/local/apache2/htdocs"
|
||||||
|
<Directory "/usr/local/apache2/htdocs">
|
||||||
|
#
|
||||||
|
# Possible values for the Options directive are "None", "All",
|
||||||
|
# or any combination of:
|
||||||
|
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
|
||||||
|
#
|
||||||
|
# Note that "MultiViews" must be named *explicitly* --- "Options All"
|
||||||
|
# doesn't give it to you.
|
||||||
|
#
|
||||||
|
# The Options directive is both complicated and important. Please see
|
||||||
|
# http://httpd.apache.org/docs/2.4/mod/core.html#options
|
||||||
|
# for more information.
|
||||||
|
#
|
||||||
|
Options Indexes FollowSymLinks
|
||||||
|
|
||||||
|
#
|
||||||
|
# AllowOverride controls what directives may be placed in .htaccess files.
|
||||||
|
# It can be "All", "None", or any combination of the keywords:
|
||||||
|
# AllowOverride FileInfo AuthConfig Limit
|
||||||
|
#
|
||||||
|
AllowOverride None
|
||||||
|
|
||||||
|
#
|
||||||
|
# Controls who can get stuff from this server.
|
||||||
|
#
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
#
|
||||||
|
# DirectoryIndex: sets the file that Apache will serve if a directory
|
||||||
|
# is requested.
|
||||||
|
#
|
||||||
|
<IfModule dir_module>
|
||||||
|
DirectoryIndex index.html
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
#
|
||||||
|
# The following lines prevent .htaccess and .htpasswd files from being
|
||||||
|
# viewed by Web clients.
|
||||||
|
#
|
||||||
|
<Files ".ht*">
|
||||||
|
Require all denied
|
||||||
|
</Files>
|
||||||
|
|
||||||
|
#
|
||||||
|
# ErrorLog: The location of the error log file.
|
||||||
|
# If you do not specify an ErrorLog directive within a <VirtualHost>
|
||||||
|
# container, error messages relating to that virtual host will be
|
||||||
|
# logged here. If you *do* define an error logfile for a <VirtualHost>
|
||||||
|
# container, that host's errors will be logged there and not here.
|
||||||
|
#
|
||||||
|
ErrorLog /proc/self/fd/2
|
||||||
|
|
||||||
|
#
|
||||||
|
# LogLevel: Control the number of messages logged to the error_log.
|
||||||
|
# Possible values include: debug, info, notice, warn, error, crit,
|
||||||
|
# alert, emerg.
|
||||||
|
#
|
||||||
|
LogLevel warn
|
||||||
|
|
||||||
|
<IfModule log_config_module>
|
||||||
|
#
|
||||||
|
# The following directives define some format nicknames for use with
|
||||||
|
# a CustomLog directive (see below).
|
||||||
|
#
|
||||||
|
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
||||||
|
LogFormat "%h %l %u %t \"%r\" %>s %b" common
|
||||||
|
|
||||||
|
<IfModule logio_module>
|
||||||
|
# You need to enable mod_logio.c to use %I and %O
|
||||||
|
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
#
|
||||||
|
# The location and format of the access logfile (Common Logfile Format).
|
||||||
|
# If you do not define any access logfiles within a <VirtualHost>
|
||||||
|
# container, they will be logged here. Contrariwise, if you *do*
|
||||||
|
# define per-<VirtualHost> access logfiles, transactions will be
|
||||||
|
# logged therein and *not* in this file.
|
||||||
|
#
|
||||||
|
CustomLog /proc/self/fd/1 common
|
||||||
|
|
||||||
|
#
|
||||||
|
# If you prefer a logfile with access, agent, and referer information
|
||||||
|
# (Combined Logfile Format) you can use the following directive.
|
||||||
|
#
|
||||||
|
#CustomLog "logs/access_log" combined
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
<IfModule alias_module>
|
||||||
|
#
|
||||||
|
# Redirect: Allows you to tell clients about documents that used to
|
||||||
|
# exist in your server's namespace, but do not anymore. The client
|
||||||
|
# will make a new request for the document at its new location.
|
||||||
|
# Example:
|
||||||
|
# Redirect permanent /foo http://www.example.com/bar
|
||||||
|
|
||||||
|
#
|
||||||
|
# Alias: Maps web paths into filesystem paths and is used to
|
||||||
|
# access content that does not live under the DocumentRoot.
|
||||||
|
# Example:
|
||||||
|
# Alias /webpath /full/filesystem/path
|
||||||
|
#
|
||||||
|
# If you include a trailing / on /webpath then the server will
|
||||||
|
# require it to be present in the URL. You will also likely
|
||||||
|
# need to provide a <Directory> section to allow access to
|
||||||
|
# the filesystem path.
|
||||||
|
|
||||||
|
#
|
||||||
|
# ScriptAlias: This controls which directories contain server scripts.
|
||||||
|
# ScriptAliases are essentially the same as Aliases, except that
|
||||||
|
# documents in the target directory are treated as applications and
|
||||||
|
# run by the server when requested rather than as documents sent to the
|
||||||
|
# client. The same rules about trailing "/" apply to ScriptAlias
|
||||||
|
# directives as to Alias.
|
||||||
|
#
|
||||||
|
ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
|
||||||
|
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
<IfModule cgid_module>
|
||||||
|
#
|
||||||
|
# ScriptSock: On threaded servers, designate the path to the UNIX
|
||||||
|
# socket used to communicate with the CGI daemon of mod_cgid.
|
||||||
|
#
|
||||||
|
#Scriptsock cgisock
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
#
|
||||||
|
# "/usr/local/apache2/cgi-bin" should be changed to whatever your ScriptAliased
|
||||||
|
# CGI directory exists, if you have that configured.
|
||||||
|
#
|
||||||
|
<Directory "/usr/local/apache2/cgi-bin">
|
||||||
|
AllowOverride None
|
||||||
|
Options None
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
<IfModule headers_module>
|
||||||
|
#
|
||||||
|
# Avoid passing HTTP_PROXY environment to CGI's on this or any proxied
|
||||||
|
# backend servers which have lingering "httpoxy" defects.
|
||||||
|
# 'Proxy' request header is undefined by the IETF, not listed by IANA
|
||||||
|
#
|
||||||
|
RequestHeader unset Proxy early
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
<IfModule mime_module>
|
||||||
|
#
|
||||||
|
# TypesConfig points to the file containing the list of mappings from
|
||||||
|
# filename extension to MIME-type.
|
||||||
|
#
|
||||||
|
TypesConfig conf/mime.types
|
||||||
|
|
||||||
|
#
|
||||||
|
# AddType allows you to add to or override the MIME configuration
|
||||||
|
# file specified in TypesConfig for specific file types.
|
||||||
|
#
|
||||||
|
#AddType application/x-gzip .tgz
|
||||||
|
#
|
||||||
|
# AddEncoding allows you to have certain browsers uncompress
|
||||||
|
# information on the fly. Note: Not all browsers support this.
|
||||||
|
#
|
||||||
|
#AddEncoding x-compress .Z
|
||||||
|
#AddEncoding x-gzip .gz .tgz
|
||||||
|
#
|
||||||
|
# If the AddEncoding directives above are commented-out, then you
|
||||||
|
# probably should define those extensions to indicate media types:
|
||||||
|
#
|
||||||
|
AddType application/x-compress .Z
|
||||||
|
AddType application/x-gzip .gz .tgz
|
||||||
|
|
||||||
|
#
|
||||||
|
# AddHandler allows you to map certain file extensions to "handlers":
|
||||||
|
# actions unrelated to filetype. These can be either built into the server
|
||||||
|
# or added with the Action directive (see below)
|
||||||
|
#
|
||||||
|
# To use CGI scripts outside of ScriptAliased directories:
|
||||||
|
# (You will also need to add "ExecCGI" to the "Options" directive.)
|
||||||
|
#
|
||||||
|
#AddHandler cgi-script .cgi
|
||||||
|
|
||||||
|
# For type maps (negotiated resources):
|
||||||
|
#AddHandler type-map var
|
||||||
|
|
||||||
|
#
|
||||||
|
# Filters allow you to process content before it is sent to the client.
|
||||||
|
#
|
||||||
|
# To parse .shtml files for server-side includes (SSI):
|
||||||
|
# (You will also need to add "Includes" to the "Options" directive.)
|
||||||
|
#
|
||||||
|
#AddType text/html .shtml
|
||||||
|
#AddOutputFilter INCLUDES .shtml
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
#
|
||||||
|
# The mod_mime_magic module allows the server to use various hints from the
|
||||||
|
# contents of the file itself to determine its type. The MIMEMagicFile
|
||||||
|
# directive tells the module where the hint definitions are located.
|
||||||
|
#
|
||||||
|
#MIMEMagicFile conf/magic
|
||||||
|
|
||||||
|
#
|
||||||
|
# Customizable error responses come in three flavors:
|
||||||
|
# 1) plain text 2) local redirects 3) external redirects
|
||||||
|
#
|
||||||
|
# Some examples:
|
||||||
|
#ErrorDocument 500 "The server made a boo boo."
|
||||||
|
#ErrorDocument 404 /missing.html
|
||||||
|
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
|
||||||
|
#ErrorDocument 402 http://www.example.com/subscription_info.html
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# MaxRanges: Maximum number of Ranges in a request before
|
||||||
|
# returning the entire resource, or one of the special
|
||||||
|
# values 'default', 'none' or 'unlimited'.
|
||||||
|
# Default setting is to accept 200 Ranges.
|
||||||
|
#MaxRanges unlimited
|
||||||
|
|
||||||
|
#
|
||||||
|
# EnableMMAP and EnableSendfile: On systems that support it,
|
||||||
|
# memory-mapping or the sendfile syscall may be used to deliver
|
||||||
|
# files. This usually improves server performance, but must
|
||||||
|
# be turned off when serving from networked-mounted
|
||||||
|
# filesystems or if support for these functions is otherwise
|
||||||
|
# broken on your system.
|
||||||
|
# Defaults: EnableMMAP On, EnableSendfile Off
|
||||||
|
#
|
||||||
|
#EnableMMAP off
|
||||||
|
#EnableSendfile on
|
||||||
|
|
||||||
|
# Supplemental configuration
|
||||||
|
#
|
||||||
|
# The configuration files in the conf/extra/ directory can be
|
||||||
|
# included to add extra features or to modify the default configuration of
|
||||||
|
# the server, or you may simply copy their contents here and change as
|
||||||
|
# necessary.
|
||||||
|
|
||||||
|
# Server-pool management (MPM specific)
|
||||||
|
#Include conf/extra/httpd-mpm.conf
|
||||||
|
|
||||||
|
# Multi-language error messages
|
||||||
|
#Include conf/extra/httpd-multilang-errordoc.conf
|
||||||
|
|
||||||
|
# Fancy directory listings
|
||||||
|
#Include conf/extra/httpd-autoindex.conf
|
||||||
|
|
||||||
|
# Language settings
|
||||||
|
#Include conf/extra/httpd-languages.conf
|
||||||
|
|
||||||
|
# User home directories
|
||||||
|
#Include conf/extra/httpd-userdir.conf
|
||||||
|
|
||||||
|
# Real-time info on requests and configuration
|
||||||
|
#Include conf/extra/httpd-info.conf
|
||||||
|
|
||||||
|
# Virtual hosts
|
||||||
|
#Include conf/extra/httpd-vhosts.conf
|
||||||
|
|
||||||
|
# Local access to the Apache HTTP Server Manual
|
||||||
|
#Include conf/extra/httpd-manual.conf
|
||||||
|
|
||||||
|
# Distributed authoring and versioning (WebDAV)
|
||||||
|
#Include conf/extra/httpd-dav.conf
|
||||||
|
|
||||||
|
# Various default settings
|
||||||
|
#Include conf/extra/httpd-default.conf
|
||||||
|
|
||||||
|
# Configure mod_proxy_html to understand HTML4/XHTML1
|
||||||
|
<IfModule proxy_html_module>
|
||||||
|
Include conf/extra/proxy-html.conf
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
# Secure (SSL/TLS) connections
|
||||||
|
Include conf/httpd-ssl.conf
|
||||||
|
#
|
||||||
|
# Note: The following must must be present to support
|
||||||
|
# starting without SSL on platforms with no /dev/random equivalent
|
||||||
|
# but a statically compiled-in mod_ssl.
|
||||||
|
#
|
||||||
|
<IfModule ssl_module>
|
||||||
|
SSLRandomSeed startup builtin
|
||||||
|
SSLRandomSeed connect builtin
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
<VirtualHost *:443>
|
||||||
|
ServerName gitea.eom.dev
|
||||||
|
ServerAlias *.gitea.eom.dev
|
||||||
|
|
||||||
|
SSLProxyEngine On
|
||||||
|
ProxyRequests Off
|
||||||
|
ProxyPreserveHost On
|
||||||
|
|
||||||
|
<Proxy *>
|
||||||
|
Order deny,allow
|
||||||
|
Allow from all
|
||||||
|
</Proxy>
|
||||||
|
|
||||||
|
ProxyPass / http://services.gitea.eom.dev.production.svc.cluster.local/
|
||||||
|
ProxyPassReverse / http://services.gitea.eom.dev.production.svc.cluster.local/
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
|
<VirtualHost *:443>
|
||||||
|
ServerName mediawiki.eom.dev
|
||||||
|
ServerAlias *.mediawiki.eom.dev
|
||||||
|
|
||||||
|
SSLProxyEngine On
|
||||||
|
ProxyRequests Off
|
||||||
|
ProxyPreserveHost On
|
||||||
|
|
||||||
|
<Proxy *>
|
||||||
|
Order deny,allow
|
||||||
|
Allow from all
|
||||||
|
</Proxy>
|
||||||
|
|
||||||
|
ProxyPass / http://services.mediawiki.eom.dev.production.svc.cluster.local/
|
||||||
|
ProxyPassReverse / http://services.mediawiki.eom.dev.production.svc.cluster.local/
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
|
<VirtualHost *:443>
|
||||||
|
ServerName nextcloud.eom.dev
|
||||||
|
ServerAlias *.nextcloud.eom.dev
|
||||||
|
|
||||||
|
SSLProxyEngine On
|
||||||
|
ProxyRequests Off
|
||||||
|
ProxyPreserveHost On
|
||||||
|
|
||||||
|
<Proxy *>
|
||||||
|
Order deny,allow
|
||||||
|
Allow from all
|
||||||
|
</Proxy>
|
||||||
|
|
||||||
|
ProxyPass / http://services.nextcloud.eom.dev.production.svc.cluster.local/
|
||||||
|
ProxyPassReverse / http://services.nextcloud.eom.dev.production.svc.cluster.local/
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
|
<VirtualHost *:443>
|
||||||
|
ServerName redmine.eom.dev
|
||||||
|
ServerAlias *.redmine.eom.dev
|
||||||
|
|
||||||
|
SSLProxyEngine On
|
||||||
|
ProxyRequests Off
|
||||||
|
ProxyPreserveHost On
|
||||||
|
|
||||||
|
<Proxy *>
|
||||||
|
Order deny,allow
|
||||||
|
Allow from all
|
||||||
|
</Proxy>
|
||||||
|
|
||||||
|
ProxyPass / http://services.redmine.eom.dev.production.svc.cluster.local/
|
||||||
|
ProxyPassReverse / http://services.redmine.eom.dev.production.svc.cluster.local/
|
||||||
|
</VirtualHost>
|
52
roles/ericomeehan.eom.dev/files/key.pem
Normal file
52
roles/ericomeehan.eom.dev/files/key.pem
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
-----BEGIN PRIVATE KEY-----
|
||||||
|
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
|
||||||
|
vN+JYEjedFNqTodRGawNqgS9qoZTdIY=
|
||||||
|
-----END PRIVATE KEY-----
|
1858
roles/ericomeehan.eom.dev/files/mime.types
Normal file
1858
roles/ericomeehan.eom.dev/files/mime.types
Normal file
File diff suppressed because it is too large
Load Diff
33
roles/ericomeehan.eom.dev/files/server.crt
Normal file
33
roles/ericomeehan.eom.dev/files/server.crt
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
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
|
||||||
|
6PpxwXnyLG1ew8Ssq9zr/5iOCA==
|
||||||
|
-----END CERTIFICATE-----
|
52
roles/ericomeehan.eom.dev/files/server.key
Normal file
52
roles/ericomeehan.eom.dev/files/server.key
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
-----BEGIN PRIVATE KEY-----
|
||||||
|
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
|
||||||
|
hmOww4Agptymd76GAjp+u5niQ81+
|
||||||
|
-----END PRIVATE KEY-----
|
2
roles/ericomeehan.eom.dev/handlers/main.yml
Normal file
2
roles/ericomeehan.eom.dev/handlers/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
# handlers file for ericomeehan.org-suite
|
52
roles/ericomeehan.eom.dev/meta/main.yml
Normal file
52
roles/ericomeehan.eom.dev/meta/main.yml
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
galaxy_info:
|
||||||
|
author: your name
|
||||||
|
description: your role description
|
||||||
|
company: your company (optional)
|
||||||
|
|
||||||
|
# If the issue tracker for your role is not on github, uncomment the
|
||||||
|
# next line and provide a value
|
||||||
|
# issue_tracker_url: http://example.com/issue/tracker
|
||||||
|
|
||||||
|
# Choose a valid license ID from https://spdx.org - some suggested licenses:
|
||||||
|
# - BSD-3-Clause (default)
|
||||||
|
# - MIT
|
||||||
|
# - GPL-2.0-or-later
|
||||||
|
# - GPL-3.0-only
|
||||||
|
# - Apache-2.0
|
||||||
|
# - CC-BY-4.0
|
||||||
|
license: license (GPL-2.0-or-later, MIT, etc)
|
||||||
|
|
||||||
|
min_ansible_version: 2.1
|
||||||
|
|
||||||
|
# If this a Container Enabled role, provide the minimum Ansible Container version.
|
||||||
|
# min_ansible_container_version:
|
||||||
|
|
||||||
|
#
|
||||||
|
# Provide a list of supported platforms, and for each platform a list of versions.
|
||||||
|
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
|
||||||
|
# To view available platforms and versions (or releases), visit:
|
||||||
|
# https://galaxy.ansible.com/api/v1/platforms/
|
||||||
|
#
|
||||||
|
# platforms:
|
||||||
|
# - name: Fedora
|
||||||
|
# versions:
|
||||||
|
# - all
|
||||||
|
# - 25
|
||||||
|
# - name: SomePlatform
|
||||||
|
# versions:
|
||||||
|
# - all
|
||||||
|
# - 1.0
|
||||||
|
# - 7
|
||||||
|
# - 99.99
|
||||||
|
|
||||||
|
galaxy_tags: []
|
||||||
|
# List tags for your role here, one per line. A tag is a keyword that describes
|
||||||
|
# and categorizes the role. Users find roles by searching for tags. Be sure to
|
||||||
|
# remove the '[]' above, if you add tags to this list.
|
||||||
|
#
|
||||||
|
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
|
||||||
|
# Maximum 20 tags per role.
|
||||||
|
|
||||||
|
dependencies: []
|
||||||
|
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
|
||||||
|
# if you add dependencies to this list.
|
111
roles/ericomeehan.eom.dev/tasks/deploy-gitea.yml
Normal file
111
roles/ericomeehan.eom.dev/tasks/deploy-gitea.yml
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
---
|
||||||
|
# tasks file for deploy-gitea.yml
|
||||||
|
# TODO: Store configuration in repository
|
||||||
|
- name: Create persistent volume for gitea
|
||||||
|
k8s:
|
||||||
|
state: present
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: pv-gitea-eom-dev
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: "{{ gitea_production_storage }}"
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
persistentVolumeReclaimPolicy: Retain
|
||||||
|
storageClassName: standard
|
||||||
|
hostPath:
|
||||||
|
path: /data/store-0/pv-gitea-eom-dev-production
|
||||||
|
nodeAffinity:
|
||||||
|
required:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: kubernetes.io/hostname
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- alpha-worker-0
|
||||||
|
|
||||||
|
- name: Create persistent volume claim for gitea data
|
||||||
|
k8s:
|
||||||
|
state: present
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: pv-claim-gitea-eom-dev-production
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: "{{ gitea_production_storage }}"
|
||||||
|
storageClassName: standard
|
||||||
|
volumeName: pv-gitea-eom-dev-production
|
||||||
|
|
||||||
|
- name: Create a deployment
|
||||||
|
k8s:
|
||||||
|
definition:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: deployment-gitea-eom-dev-production
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: eom.dev
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: eom.dev
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: gitea
|
||||||
|
image: gitea/gitea
|
||||||
|
volumeMounts:
|
||||||
|
- name: pv-gitea-eom-dev-production
|
||||||
|
mountPath: /var/lib/gitea
|
||||||
|
ports:
|
||||||
|
- containerPort: 2222
|
||||||
|
- containerPort: 3000
|
||||||
|
env:
|
||||||
|
- name: GITEA__database__DB_TYPE
|
||||||
|
value: "mysql"
|
||||||
|
- name: GITEA__database__HOST
|
||||||
|
value: "service.mariadb.eom.dev.production.svc.cluster.local:3306"
|
||||||
|
- name: GITEA__database__NAME
|
||||||
|
value: "gitea"
|
||||||
|
- name: GITEA__database__USER
|
||||||
|
value: "gitea"
|
||||||
|
- name: GITEA__database__PASSWD
|
||||||
|
value: "{{ gitea_mariadb_password }}"
|
||||||
|
volumes:
|
||||||
|
- name: pv-gitea-eom-dev-production
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: pv-claim.redis.eom.dev
|
||||||
|
|
||||||
|
- name: Expose deployment as a service
|
||||||
|
k8s:
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: service-gitea-eom-dev-production
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: eom.dev
|
||||||
|
ports:
|
||||||
|
- port: 22
|
||||||
|
targetPort: 2222
|
||||||
|
protocol: TCP
|
||||||
|
name: gitea-port-22
|
||||||
|
- port: 80
|
||||||
|
targetPort: 3000
|
||||||
|
protocol: TCP
|
||||||
|
name: gitea-port-80
|
||||||
|
type: ClusterIP
|
94
roles/ericomeehan.eom.dev/tasks/deploy-grafana.yml
Normal file
94
roles/ericomeehan.eom.dev/tasks/deploy-grafana.yml
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
---
|
||||||
|
# tasks file for deploy-grafana.yml
|
||||||
|
- name: Create persistent volume for grafana
|
||||||
|
k8s:
|
||||||
|
state: present
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: pv-grafana-eom-dev-production
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: {{ grafana_production_storage }}
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
persistentVolumeReclaimPolicy: Retain
|
||||||
|
storageClassName: standard
|
||||||
|
hostPath:
|
||||||
|
path: /data/vault-0/pv-grafana-eom-dev-production
|
||||||
|
nodeAffinity:
|
||||||
|
required:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: kubernetes.io/hostname
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- alpha-worker-0
|
||||||
|
|
||||||
|
- name: Create persistent volume claim for grafana
|
||||||
|
k8s:
|
||||||
|
state: present
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: pv-claim-grafana-eom-dev-production
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ grafana_production_storage }}
|
||||||
|
storageClassName: standard
|
||||||
|
volumeName: pv-grafana-eom-dev-production
|
||||||
|
|
||||||
|
- name: Create a deployment
|
||||||
|
k8s:
|
||||||
|
definition:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: deployment-grafana-eom-dev-production
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: eom.dev
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: eom.dev
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: grafana
|
||||||
|
image: grafana/grafana
|
||||||
|
volumeMounts:
|
||||||
|
- name: pv-grafana-eom-dev-production
|
||||||
|
mountPath: /var/lib/grafana
|
||||||
|
ports:
|
||||||
|
- containerPort: 30000
|
||||||
|
volumes:
|
||||||
|
- name: pv-grafana-eom-dev-production
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: pv-claim-grafana-eom-dev-production
|
||||||
|
|
||||||
|
- name: Expose deployment as a service
|
||||||
|
k8s:
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: service-grafana-eom-dev-production
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: eom.dev
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 3000
|
||||||
|
protocol: TCP
|
||||||
|
name: grafana-port-80
|
||||||
|
type: ClusterIP
|
105
roles/ericomeehan.eom.dev/tasks/deploy-influxdb.yml
Normal file
105
roles/ericomeehan.eom.dev/tasks/deploy-influxdb.yml
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
---
|
||||||
|
# tasks file for deploy-influxdb.yml
|
||||||
|
- name: Create persistent volume for influxdb
|
||||||
|
k8s:
|
||||||
|
state: present
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: pv-influxdb-eom-dev
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: {{ influxdb_production_storage }}
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
persistentVolumeReclaimPolicy: Retain
|
||||||
|
storageClassName: standard
|
||||||
|
hostPath:
|
||||||
|
path: /data/vault-0/pv-influxdb-eom-dev
|
||||||
|
nodeAffinity:
|
||||||
|
required:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: kubernetes.io/hostname
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- alpha-worker-0
|
||||||
|
|
||||||
|
- name: Create persistent volume claim for influxdb
|
||||||
|
k8s:
|
||||||
|
state: present
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: pv-claim-influxdb-eom-dev
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ influxdb_production_storage }}
|
||||||
|
storageClassName: standard
|
||||||
|
volumeName: pv-influxdb-eom-dev
|
||||||
|
|
||||||
|
- name: Create a deployment
|
||||||
|
k8s:
|
||||||
|
definition:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: deployment-influxdb-eom-dev
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: eom.dev
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: eom.dev
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: influxdb
|
||||||
|
image: influxdb
|
||||||
|
volumeMounts:
|
||||||
|
- name: pv-influxdb-eom-dev
|
||||||
|
mountPath: /var/lib/influxdb2
|
||||||
|
ports:
|
||||||
|
containerPort: 8086
|
||||||
|
env:
|
||||||
|
# TODO: are these defined?
|
||||||
|
- name: DOCKER_INFLUXDB_INIT_MODE
|
||||||
|
value: "setup"
|
||||||
|
- name: DOCKER_INFLUXDB_INIT_USERNAME
|
||||||
|
value: "{{ influxdb_init_username }}"
|
||||||
|
- name: DOCKER_INFLUXDB_INIT_PASSWORD
|
||||||
|
value: "{{ influxdb_init_password }}"
|
||||||
|
- name: DOCKER_INFLUXDB_INIT_ORG
|
||||||
|
value: "{{ influxdb_init_org }}"
|
||||||
|
- name: DOCKER_INFLUXDB_INIT_BUCKET
|
||||||
|
value: "{{ influxdb_init_bucket }}"
|
||||||
|
volumes:
|
||||||
|
- name: pv-influxdb-eom-dev
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: pv-claim-influxdb-eom-dev
|
||||||
|
|
||||||
|
- name: Expose deployment as a service
|
||||||
|
k8s:
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: service-influxdb-eom-dev
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: eom.dev
|
||||||
|
ports:
|
||||||
|
- port: 8086
|
||||||
|
protocol: TCP
|
||||||
|
name: influxdb-port-8086
|
||||||
|
type: ClusterIP
|
113
roles/ericomeehan.eom.dev/tasks/deploy-mariadb.yml
Normal file
113
roles/ericomeehan.eom.dev/tasks/deploy-mariadb.yml
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
---
|
||||||
|
# tasks file for deploy-mariadb.yml
|
||||||
|
- name: Create a ConfigMap for database schema
|
||||||
|
k8s:
|
||||||
|
state: present
|
||||||
|
api_version: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
name: cm-mariadb-eom-dev-production
|
||||||
|
namespace: production
|
||||||
|
definition:
|
||||||
|
data:
|
||||||
|
schema.sql: "{{ lookup('template', 'schema.sql.j2') }}"
|
||||||
|
|
||||||
|
- name: Create persistent volume for mariadb
|
||||||
|
k8s:
|
||||||
|
state: present
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: pv-mariadb-eom-dev-production
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: "{{ mariadb_production_storage }}"
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
persistentVolumeReclaimPolicy: Retain
|
||||||
|
storageClassName: standard
|
||||||
|
hostPath:
|
||||||
|
path: /data/store-0/pv-mariadb-eom-dev-production
|
||||||
|
nodeAffinity:
|
||||||
|
required:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: kubernetes.io/hostname
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- alpha-worker-0
|
||||||
|
|
||||||
|
- name: Create persistent volume claim for mariadb
|
||||||
|
k8s:
|
||||||
|
state: present
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: pvc-mariadb-eom-dev-production
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: "{{ mariadb_production_storage }}"
|
||||||
|
storageClassName: standard
|
||||||
|
volumeName: pv-mariadb-eom-dev-production
|
||||||
|
|
||||||
|
- name: Create a deployment
|
||||||
|
k8s:
|
||||||
|
definition:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: deployment-mariadb-eom-dev-production
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: eom.dev
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: eom.dev
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: mariadb
|
||||||
|
image: mariadb
|
||||||
|
volumeMounts:
|
||||||
|
- name: pv-mariadb-eom-dev-production
|
||||||
|
mountPath: /var/lib/mysql
|
||||||
|
- name: schema-sql
|
||||||
|
mountPath: /docker-entrypoint-initdb.d
|
||||||
|
ports:
|
||||||
|
- containerPort: 8086
|
||||||
|
env:
|
||||||
|
- name: MARIADB_ROOT_PASSWORD
|
||||||
|
value: "{{ mariadb_root_password }}"
|
||||||
|
volumes:
|
||||||
|
- name: schema-sql
|
||||||
|
configMap:
|
||||||
|
name: cm-mariadb-eom-dev-production
|
||||||
|
- name: pv-mariadb-eom-dev-production
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: pvc-mariadb-eom-dev-production
|
||||||
|
|
||||||
|
- name: Expose deployment as a service
|
||||||
|
k8s:
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: service-mariadb-eom-dev-production
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: eom.dev
|
||||||
|
ports:
|
||||||
|
- port: 3306
|
||||||
|
targetPort: 8086
|
||||||
|
protocol: TCP
|
||||||
|
name: mariadb-port-8086
|
||||||
|
type: ClusterIP
|
96
roles/ericomeehan.eom.dev/tasks/deploy-mediawiki.yml
Normal file
96
roles/ericomeehan.eom.dev/tasks/deploy-mediawiki.yml
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
---
|
||||||
|
# tasks file for deploy-mediawiki.yml
|
||||||
|
# TODO: Create config map for LocalSettings.php
|
||||||
|
- name: Create persistent volume for mediawiki
|
||||||
|
k8s:
|
||||||
|
state: present
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: pv-mediawiki-eom-dev
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: "{{ mediawiki_production_storage }}"
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
persistentVolumeReclaimPolicy: Retain
|
||||||
|
storageClassName: standard
|
||||||
|
hostPath:
|
||||||
|
path: /data/store-0/pv-mediawiki-eom-dev
|
||||||
|
nodeAffinity:
|
||||||
|
required:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: kubernetes.io/hostname
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- alpha-worker-0
|
||||||
|
|
||||||
|
# TODO: Download and install extensions...
|
||||||
|
|
||||||
|
- name: Create persistent volume claim for mediawiki
|
||||||
|
k8s:
|
||||||
|
state: present
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: pvc-mediawiki-eom-dev
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: "{{ mediawiki_production_storage }}"
|
||||||
|
storageClassName: standard
|
||||||
|
volumeName: pv-mediawiki-eom-dev
|
||||||
|
|
||||||
|
- name: Create a deployment
|
||||||
|
k8s:
|
||||||
|
definition:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: deployment-mediawiki-eom-dev
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: eom.dev
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: eom.dev
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: mediawiki
|
||||||
|
image: mediawiki
|
||||||
|
volumeMounts:
|
||||||
|
- name: pv-mediawiki-eom-dev
|
||||||
|
mountPath: /var/www/html/images
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
volumes:
|
||||||
|
- name: pv-mediawiki-eom-dev
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: pvc-mediawiki-eom-dev
|
||||||
|
|
||||||
|
- name: Expose deployment as a service
|
||||||
|
k8s:
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: service-mediawiki-eom-dev
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: eom.dev
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
protocol: TCP
|
||||||
|
name: mediawiki-port-80
|
||||||
|
type: ClusterIP
|
102
roles/ericomeehan.eom.dev/tasks/deploy-nextcloud.yml
Normal file
102
roles/ericomeehan.eom.dev/tasks/deploy-nextcloud.yml
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
---
|
||||||
|
# tasks file for deploy-nextcloud.yml
|
||||||
|
- name: Create persistent volume for nextcloud
|
||||||
|
k8s:
|
||||||
|
state: present
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: nextcloud-pv
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: "{{ nextcloud_production_storage }}"
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
persistentVolumeReclaimPolicy: Retain
|
||||||
|
storageClassName: standard
|
||||||
|
hostPath:
|
||||||
|
path: /data/store-0/pv-nextcloud-eom-dev
|
||||||
|
nodeAffinity:
|
||||||
|
required:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: kubernetes.io/hostname
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- alpha-worker-0
|
||||||
|
|
||||||
|
- name: Create persistent volume claim for nextcloud
|
||||||
|
k8s:
|
||||||
|
state: present
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: pv-claim-nextcloud-eom-dev
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: "{{ nextcloud_production_storage }}"
|
||||||
|
storageClassName: standard
|
||||||
|
volumeName: openldap-db-pv
|
||||||
|
|
||||||
|
- name: Create a deployment
|
||||||
|
k8s:
|
||||||
|
definition:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: deployment-nextcloud-eom-dev
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: eom.dev
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: eom.dev
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: nextcloud
|
||||||
|
image: nextcloud
|
||||||
|
volumeMounts:
|
||||||
|
- name: pv-nextcloud-eom-dev
|
||||||
|
mountPath: /var/www/html
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
env:
|
||||||
|
- name: MYSQL_HOST
|
||||||
|
value: "service.mariadb.eom.dev.production.svc.cluster.local"
|
||||||
|
- name: MYSQL_DATABASE
|
||||||
|
value: "nextcloud"
|
||||||
|
- name: MYSQL_USER
|
||||||
|
value: "nextcloud"
|
||||||
|
- name: MYSQL_PASSWORD
|
||||||
|
value: "{{ nextcloud_mariadb_password }}"
|
||||||
|
volumes:
|
||||||
|
- name: pv-nextcloud-eom-dev
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: pv-claim-nextcloud-eom-dev
|
||||||
|
|
||||||
|
- name: Expose deployment as a service
|
||||||
|
k8s:
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: service-nextcloud-eom-dev
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: eom.dev
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
protocol: TCP
|
||||||
|
name: nextcloud-port-80
|
||||||
|
type: ClusterIP
|
0
roles/ericomeehan.eom.dev/tasks/deploy-openldap.yml
Normal file
0
roles/ericomeehan.eom.dev/tasks/deploy-openldap.yml
Normal file
94
roles/ericomeehan.eom.dev/tasks/deploy-postfix.yml
Normal file
94
roles/ericomeehan.eom.dev/tasks/deploy-postfix.yml
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
---
|
||||||
|
# tasks file for deploy-postfix.yml
|
||||||
|
- name: Create persistent volume for postfix
|
||||||
|
k8s:
|
||||||
|
state: present
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: postfix-pv
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: {{ postfix_storage }}
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
persistentVolumeReclaimPolicy: Retain
|
||||||
|
storageClassName: standard
|
||||||
|
hostPath:
|
||||||
|
path: /data/vault-0/pv.postfix.eom.dev
|
||||||
|
nodeAffinity:
|
||||||
|
required:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: kubernetes.io/hostname
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- alpha-worker-0
|
||||||
|
|
||||||
|
- name: Create persistent volume claim for postfix
|
||||||
|
k8s:
|
||||||
|
state: present
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: pv-claim.postfix.eom.dev
|
||||||
|
namespace: {{ namespace }}
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ postfix_storage }}
|
||||||
|
storageClassName: standard
|
||||||
|
volumeName: pv.postfix.eom.dev
|
||||||
|
|
||||||
|
- name: Create a deployment
|
||||||
|
k8s:
|
||||||
|
definition:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: deployment.postfix.eom.dev
|
||||||
|
namespace: {{ namespace }}
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: eom.dev
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: eom.dev
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: postfix
|
||||||
|
image: catatnight/postfix
|
||||||
|
volumeMounts:
|
||||||
|
- name: pv.postfix.eom.dev
|
||||||
|
# TODO: Where is postfix data stored?
|
||||||
|
mountPath: /usr/src/postfix/files
|
||||||
|
ports:
|
||||||
|
- containerPort: 587
|
||||||
|
volumes:
|
||||||
|
- name: pv.postfix.eom.dev
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: pv-claim.postfix.eom.dev
|
||||||
|
|
||||||
|
- name: Expose deployment as a service
|
||||||
|
k8s:
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: service.postfix.eom.dev
|
||||||
|
namespace: {{ namespace }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: eom.dev
|
||||||
|
ports:
|
||||||
|
- port: 587
|
||||||
|
protocol: TCP
|
||||||
|
name: postfix-port-587
|
||||||
|
type: ClusterIP
|
93
roles/ericomeehan.eom.dev/tasks/deploy-redis.yml
Normal file
93
roles/ericomeehan.eom.dev/tasks/deploy-redis.yml
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
---
|
||||||
|
# tasks file for deploy-redis.yml
|
||||||
|
- name: Create persistent volume for redis
|
||||||
|
k8s:
|
||||||
|
state: present
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: pv-redis-eom-dev
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: "{{ redis_production_storage }}"
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
persistentVolumeReclaimPolicy: Retain
|
||||||
|
storageClassName: standard
|
||||||
|
hostPath:
|
||||||
|
path: /data/store-0/pv-redis-eom-dev
|
||||||
|
nodeAffinity:
|
||||||
|
required:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: kubernetes.io/hostname
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- alpha-worker-0
|
||||||
|
|
||||||
|
- name: Create persistent volume claim for redis
|
||||||
|
k8s:
|
||||||
|
state: present
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: pvc-redis-eom-dev
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: "{{ redis_production_storage }}"
|
||||||
|
storageClassName: standard
|
||||||
|
volumeName: pv-redis-eom-dev
|
||||||
|
|
||||||
|
- name: Create a deployment
|
||||||
|
k8s:
|
||||||
|
definition:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: deployment-redis-eom-dev
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: eom.dev
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: eom.dev
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: redis
|
||||||
|
image: redis
|
||||||
|
volumeMounts:
|
||||||
|
- name: pv-redis-eom-dev
|
||||||
|
mountPath: /data
|
||||||
|
ports:
|
||||||
|
- containerPort: 6379
|
||||||
|
volumes:
|
||||||
|
- name: redis.pv.eom.dev
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: pvc-redis-eom-dev
|
||||||
|
|
||||||
|
- name: Expose deployment as a service
|
||||||
|
k8s:
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: service-redis-eom-dev
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: eom.dev
|
||||||
|
ports:
|
||||||
|
- port: 6379
|
||||||
|
protocol: TCP
|
||||||
|
name: redis-port-6379
|
||||||
|
type: ClusterIP
|
105
roles/ericomeehan.eom.dev/tasks/deploy-redmine.yml
Normal file
105
roles/ericomeehan.eom.dev/tasks/deploy-redmine.yml
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
---
|
||||||
|
# tasks file for deploy-redmine.yml
|
||||||
|
- name: Create persistent volume for redmine
|
||||||
|
k8s:
|
||||||
|
state: present
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: pv-redmine-eom-dev
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: "{{ redmine_production_storage }}"
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
persistentVolumeReclaimPolicy: Retain
|
||||||
|
storageClassName: standard
|
||||||
|
hostPath:
|
||||||
|
path: /data/store-0/pv-redmine-eom-dev
|
||||||
|
nodeAffinity:
|
||||||
|
required:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: kubernetes.io/hostname
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- alpha-worker-0
|
||||||
|
|
||||||
|
- name: Create persistent volume claim for redmine
|
||||||
|
k8s:
|
||||||
|
state: present
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: pvc-redmine-eom-dev
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: "{{ redmine_production_storage }}"
|
||||||
|
storageClassName: standard
|
||||||
|
volumeName: pv-redmine-eom-dev
|
||||||
|
|
||||||
|
- name: Create a deployment
|
||||||
|
k8s:
|
||||||
|
definition:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: deployment-redmine-eom-dev
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: eom.dev
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: eom.dev
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: redmine
|
||||||
|
image: redmine
|
||||||
|
volumeMounts:
|
||||||
|
- name: pv-redmine-eom-dev
|
||||||
|
mountPath: /usr/src/redmine/files
|
||||||
|
ports:
|
||||||
|
- containerPort: 3000
|
||||||
|
env:
|
||||||
|
- name: REDMINE_DB_MYSQL
|
||||||
|
value: "service.mariadb.eom.dev.production.svc.cluster.local"
|
||||||
|
- name: REDMINE_DB_PORT
|
||||||
|
value: "3306"
|
||||||
|
- name: REDMINE_DB_DATABASE
|
||||||
|
value: "redmine"
|
||||||
|
- name: REDMINE_DB_USERNAME
|
||||||
|
value: "redmine"
|
||||||
|
- name: REDMINE_DB_PASSWORD
|
||||||
|
value: "{{ redmine_mariadb_password }}"
|
||||||
|
volumes:
|
||||||
|
- name: pv-redmine-eom-dev
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: pvc-redmine-eom-dev
|
||||||
|
|
||||||
|
- name: Expose deployment as a service
|
||||||
|
k8s:
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: service-redmine-eom-dev
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: eom.dev
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 3000
|
||||||
|
protocol: TCP
|
||||||
|
name: redmine-port-80
|
||||||
|
type: ClusterIP
|
64
roles/ericomeehan.eom.dev/tasks/deploy-reverse-proxy.yml
Normal file
64
roles/ericomeehan.eom.dev/tasks/deploy-reverse-proxy.yml
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
---
|
||||||
|
# tasks file for deploy-reverse-proxy.yml
|
||||||
|
- name: Create ConfigMap for httpd
|
||||||
|
k8s:
|
||||||
|
state: present
|
||||||
|
api_version: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
name: cm-reverse-proxy-eom-dev-production
|
||||||
|
namespace: production
|
||||||
|
definition:
|
||||||
|
data:
|
||||||
|
httpd.conf: "{{ lookup('file', 'httpd.conf') }}"
|
||||||
|
httpd-ssl.conf: "{{ lookup('file', 'httpd-ssl.conf') }}"
|
||||||
|
mime.types: "{{ lookup('file', 'mime.types') }}"
|
||||||
|
server.crt: "{{ lookup('file', 'server.crt') }}"
|
||||||
|
server.key: "{{ lookup('file', 'server.key') }}"
|
||||||
|
|
||||||
|
- name: Create a deployment
|
||||||
|
k8s:
|
||||||
|
definition:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: deployment-reverse-proxy-eom-dev-production
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: eom.dev
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: eom.dev
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: reverse-proxy
|
||||||
|
image: httpd
|
||||||
|
volumeMounts:
|
||||||
|
- name: httpd-conf
|
||||||
|
mountPath: /usr/local/apache2/conf
|
||||||
|
ports:
|
||||||
|
- containerPort: 443
|
||||||
|
volumes:
|
||||||
|
- name: httpd-conf
|
||||||
|
configMap:
|
||||||
|
name: cm-reverse-proxy-eom-dev-production
|
||||||
|
|
||||||
|
- name: Expose deployment as a service
|
||||||
|
k8s:
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: service-reverse-proxy-eom-dev-production
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: eom.dev
|
||||||
|
ports:
|
||||||
|
- port: 443
|
||||||
|
protocol: TCP
|
||||||
|
name: reverse-proxy-port-22
|
||||||
|
type: NodePort
|
14
roles/ericomeehan.eom.dev/tasks/main.yml
Normal file
14
roles/ericomeehan.eom.dev/tasks/main.yml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
# tasks file for ericomeehan.org-suite
|
||||||
|
- name: Deploy reverse-proxy
|
||||||
|
include_tasks: deploy-reverse-proxy.yml
|
||||||
|
- name: Deploy mariadb
|
||||||
|
include_tasks: deploy-mariadb.yml
|
||||||
|
- name: Deploy gitea
|
||||||
|
include_tasks: deploy-gitea.yml
|
||||||
|
- name: Deploy mediawiki
|
||||||
|
include_tasks: deploy-mediawiki.yml
|
||||||
|
- name: Deploy nextcloud
|
||||||
|
include_tasks: deploy-nextcloud.yml
|
||||||
|
- name: Deploy redmine
|
||||||
|
include_tasks: deploy-redmine.yml
|
19
roles/ericomeehan.eom.dev/templates/schema.sql.j2
Normal file
19
roles/ericomeehan.eom.dev/templates/schema.sql.j2
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
CREATE USER 'gitea'@'%' IDENTIFIED BY '{{ gitea_mariadb_password }}';
|
||||||
|
CREATE DATABASE IF NOT EXISTS gitea
|
||||||
|
GRANT ALL PRIVILEGES on gitea.* to 'gitea'@'%';
|
||||||
|
FLUSH privileges;
|
||||||
|
|
||||||
|
CREATE USER 'mediawiki'@'%' IDENTIFIED BY '{{ mediawiki_mariadb_password }}';
|
||||||
|
CREATE DATABASE IF NOT EXISTS mediawiki
|
||||||
|
GRANT ALL PRIVILEGES on mediawiki.* to 'mediawiki'@'%';
|
||||||
|
FLUSH privileges;
|
||||||
|
|
||||||
|
CREATE USER 'nextcloud'@'%' IDENTIFIED BY '{{ nextcloud_mariadb_password }}';
|
||||||
|
CREATE DATABASE IF NOT EXISTS nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
|
||||||
|
GRANT ALL PRIVILEGES on nextcloud.* to 'nextcloud'@'%';
|
||||||
|
FLUSH privileges;
|
||||||
|
|
||||||
|
CREATE USER 'redmine'@'%' IDENTIFIED BY '{{ redmine_mariadb_password }}';
|
||||||
|
CREATE DATABASE IF NOT EXISTS redmine
|
||||||
|
GRANT ALL PRIVILEGES on redmine.* to 'redmine'@'%';
|
||||||
|
FLUSH privileges;
|
2
roles/ericomeehan.eom.dev/tests/inventory
Normal file
2
roles/ericomeehan.eom.dev/tests/inventory
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
localhost
|
||||||
|
|
5
roles/ericomeehan.eom.dev/tests/test.yml
Normal file
5
roles/ericomeehan.eom.dev/tests/test.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
- hosts: localhost
|
||||||
|
remote_user: root
|
||||||
|
roles:
|
||||||
|
- ericomeehan.org-suite
|
2
roles/ericomeehan.eom.dev/vars/main.yml
Normal file
2
roles/ericomeehan.eom.dev/vars/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
# vars file for ericomeehan.org-suite
|
@ -1,119 +1,50 @@
|
|||||||
# eric prompt theme
|
# Generic large colour fade-bar prompt theme from bashprompt
|
||||||
|
# Created by James Manning <jmm@raleigh.ibm.com>
|
||||||
|
# Changed by Spidey 08/06
|
||||||
|
# Converted to zsh prompt theme by <adam@spiers.net>
|
||||||
|
|
||||||
prompt_eric_help () {
|
prompt_bigfade_help () {
|
||||||
cat <<'EOF'
|
cat <<EOH
|
||||||
This prompt is color-scheme-able. You can invoke it thus:
|
This prompt is color-scheme-able. You can invoke it thus:
|
||||||
|
|
||||||
prompt eric [ 8bit ] [<color1> [<color2> [<color3>] [<color4>]]
|
prompt bigfade [<fade-bar> [<userhost> [<date> [<cwd>]]]]
|
||||||
|
|
||||||
where the colors are for the hyphens, current directory, user@host,
|
where the parameters are the colors for the fade-bar, user@host text,
|
||||||
and user input bits respectively. The default colors are cyan, green,
|
date text, and current working directory respectively. The default
|
||||||
cyan, and white. This theme works best with a dark background.
|
colors are blue, white, white, and yellow. This theme works best with
|
||||||
|
a dark background.
|
||||||
|
|
||||||
If you have either UTF-8 or the `nexus' or `vga' console fonts or similar,
|
|
||||||
you can specify the `8bit' option to use 8-bit replacements for the
|
|
||||||
7-bit characters.
|
|
||||||
|
|
||||||
And you probably thought adam1 was overkill ...
|
Recommended fonts for this theme: either UTF-8, or nexus or vga or similar.
|
||||||
EOF
|
If you don't have any of these, the 8-bit characters will probably look
|
||||||
|
stupid.
|
||||||
|
EOH
|
||||||
}
|
}
|
||||||
|
|
||||||
prompt_eric_setup () {
|
prompt_bigfade_setup () {
|
||||||
# Some can't be local
|
local fadebar=${1:-'cyan'}
|
||||||
setopt localoptions nowarncreateglobal
|
local userhost=${2:-'white'}
|
||||||
local prompt_gfx_tlc prompt_gfx_mlc prompt_gfx_blc
|
local date=${3:-'white'}
|
||||||
|
local cwd=${4:-'cyan'}
|
||||||
|
|
||||||
if [[ $1 == '8bit' ]]; then
|
local -A schars
|
||||||
shift
|
autoload -Uz prompt_special_chars
|
||||||
if [[ ${LC_ALL:-${LC_CTYPE:-$LANG}} = *UTF-8* ]]; then
|
prompt_special_chars
|
||||||
prompt_gfx_tlc=$'\xe2\x94\x8c'
|
|
||||||
prompt_gfx_mlc=$'\xe2\x94\x9c'
|
PS1="%B%F{$fadebar}$schars[333]$schars[262]$schars[261]$schars[260]%B%F{$userhost}%K{$fadebar}%n@%m%b%k%f%F{$fadebar}%K{black}$schars[260]$schars[261]$schars[262]$schars[333]%b%f%k%F{$fadebar}%K{black}$schars[333]$schars[262]$schars[261]$schars[260]%B%F{$date}%b%f%k %D{%a %b %d} %D{%I:%M:%S%P} %B%F{$cwd}%d$prompt_newline> "
|
||||||
prompt_gfx_blc=$'\xe2\x94\x94'
|
PS2="%B%F{$fadebar}>%b%f%k "
|
||||||
prompt_gfx_hyphen=$'\xe2\x94\x80'
|
|
||||||
else
|
prompt_opts=(cr subst percent)
|
||||||
prompt_gfx_tlc=$'\xda'
|
}
|
||||||
prompt_gfx_mlc=$'\xc3'
|
|
||||||
prompt_gfx_blc=$'\xc0'
|
prompt_bigfade_preview () {
|
||||||
prompt_gfx_hyphen=$'\xc4'
|
if (( ! $#* )); then
|
||||||
fi
|
prompt_preview_theme bigfade
|
||||||
|
print
|
||||||
|
prompt_preview_theme bigfade red white grey white
|
||||||
else
|
else
|
||||||
prompt_gfx_tlc='.'
|
prompt_preview_theme bigfade "$@"
|
||||||
prompt_gfx_mlc='|'
|
|
||||||
prompt_gfx_blc='\`'
|
|
||||||
prompt_gfx_hyphen='-'
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Colour scheme
|
|
||||||
prompt_eric_color1=${1:-'white'} # hyphens
|
|
||||||
prompt_eric_color2=${2:-'cyan'} # current directory
|
|
||||||
prompt_eric_color3=${3:-'cyan'} # user@host
|
|
||||||
prompt_eric_color4=${4:-'white'} # user input
|
|
||||||
|
|
||||||
local prompt_gfx_bbox
|
|
||||||
prompt_gfx_tbox="%B%F{$prompt_eric_color1}${prompt_gfx_tlc}%b%F{$prompt_eric_color1}${prompt_gfx_hyphen}"
|
|
||||||
prompt_gfx_bbox="%B%F{$prompt_eric_color1}${prompt_gfx_blc}${prompt_gfx_hyphen}%b%F{$prompt_eric_color1}"
|
|
||||||
|
|
||||||
# This is a cute hack. Well I like it, anyway.
|
|
||||||
prompt_gfx_bbox_to_mbox=$'%{\e[A\r'"%}%B%F{$prompt_eric_color1}${prompt_gfx_mlc}%b%F{$prompt_eric_color1}${prompt_gfx_hyphen}%{"$'\e[B%}'
|
|
||||||
|
|
||||||
prompt_l_paren="%B%F{black}("
|
|
||||||
prompt_r_paren="%B%F{black})"
|
|
||||||
|
|
||||||
prompt_user_host="%b%F{$prompt_eric_color3}%n%B%F{$prompt_eric_color3}@%b%F{$prompt_eric_color3}%m %{$fg[cyan]%}[%D{%f/%m/%y} %D{%L:%M:%S}]"
|
|
||||||
|
|
||||||
prompt_line_1a="$prompt_gfx_tbox$prompt_l_paren%B%F{$prompt_eric_color2}%~$prompt_r_paren%b%F{$prompt_eric_color1}"
|
|
||||||
prompt_line_1b="$prompt_l_paren$prompt_user_host$prompt_r_paren%b%F{$prompt_eric_color1}${prompt_gfx_hyphen}"
|
|
||||||
|
|
||||||
prompt_line_2="$prompt_gfx_bbox${prompt_gfx_hyphen}%B%F{white}"
|
|
||||||
|
|
||||||
prompt_char="%(!.#.>)"
|
|
||||||
|
|
||||||
prompt_opts=(cr subst percent)
|
|
||||||
|
|
||||||
add-zsh-hook precmd prompt_eric_precmd
|
|
||||||
}
|
}
|
||||||
|
|
||||||
prompt_eric_precmd() {
|
prompt_bigfade_setup "$@"
|
||||||
setopt localoptions extendedglob noxtrace nowarncreateglobal
|
|
||||||
local prompt_line_1
|
|
||||||
|
|
||||||
prompt_eric_choose_prompt
|
|
||||||
|
|
||||||
PS1="$prompt_line_1$prompt_newline$prompt_line_2%B%F{white}$prompt_char %b%f%k"
|
|
||||||
PS2="$prompt_line_2$prompt_gfx_bbox_to_mbox%B%F{white}-> %b%f%k"
|
|
||||||
PS3="$prompt_line_2$prompt_gfx_bbox_to_mbox%B%F{white}-> %b%f%k"
|
|
||||||
zle_highlight[(r)default:*]="default:fg=$prompt_eric_color4,bold"
|
|
||||||
}
|
|
||||||
|
|
||||||
prompt_eric_choose_prompt () {
|
|
||||||
local prompt_line_1a_width=${#${(S%%)prompt_line_1a//(\%([KF1]|)\{*\}|\%[Bbkf])}}
|
|
||||||
local prompt_line_1b_width=${#${(S%%)prompt_line_1b//(\%([KF1]|)\{*\}|\%[Bbkf])}}
|
|
||||||
|
|
||||||
local prompt_padding_size=$(( COLUMNS
|
|
||||||
- prompt_line_1a_width
|
|
||||||
- prompt_line_1b_width ))
|
|
||||||
|
|
||||||
# Try to fit in long path and user@host.
|
|
||||||
if (( prompt_padding_size > 0 )); then
|
|
||||||
local prompt_padding
|
|
||||||
eval "prompt_padding=\${(l:${prompt_padding_size}::${prompt_gfx_hyphen}:)_empty_zz}"
|
|
||||||
prompt_line_1="$prompt_line_1a$prompt_padding$prompt_line_1b"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
prompt_padding_size=$(( COLUMNS - prompt_line_1a_width ))
|
|
||||||
|
|
||||||
# Didn't fit; try to fit in just long path.
|
|
||||||
if (( prompt_padding_size > 0 )); then
|
|
||||||
local prompt_padding
|
|
||||||
eval "prompt_padding=\${(l:${prompt_padding_size}::${prompt_gfx_hyphen}:)_empty_zz}"
|
|
||||||
prompt_line_1="$prompt_line_1a$prompt_padding"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Still didn't fit; truncate
|
|
||||||
local prompt_pwd_size=$(( COLUMNS - 5 ))
|
|
||||||
prompt_line_1="$prompt_gfx_tbox$prompt_l_paren%B%F{$prompt_eric_color2}%$prompt_pwd_size<...<%~%<<$prompt_r_paren%b%F{$prompt_eric_color1}$prompt_gfx_hyphen"
|
|
||||||
}
|
|
||||||
|
|
||||||
prompt_eric_setup "$@"
|
|
||||||
|
@ -14,14 +14,10 @@
|
|||||||
|
|
||||||
- name: Copy zsh configuration
|
- name: Copy zsh configuration
|
||||||
copy:
|
copy:
|
||||||
src: files/zsrhc
|
src: zshrc
|
||||||
dest: /home/eric/.zsrhc
|
dest: /home/eric/.zshrc
|
||||||
|
|
||||||
- name: Install custom zsh prompt
|
- name: Install custom zsh prompt
|
||||||
copy:
|
copy:
|
||||||
src: files/prompt_eric_setup
|
src: prompt_eric_setup
|
||||||
dest: /usr/share/zsh/functions/Prompts/prompt_eric_setup
|
dest: /usr/share/zsh/functions/Prompts/prompt_eric_setup
|
||||||
|
|
||||||
- name: Setup mobile command
|
|
||||||
include_tasks: mobile-command.yml
|
|
||||||
when: ansible_host == mobil_command
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
- git
|
- git
|
||||||
- gimp
|
- gimp
|
||||||
- gpsd
|
- gpsd
|
||||||
|
- mariadb-client
|
||||||
- neovim
|
- neovim
|
||||||
- openscad
|
- openscad
|
||||||
- passwordsafe
|
- passwordsafe
|
||||||
@ -21,12 +22,12 @@
|
|||||||
|
|
||||||
- name: Copy tmux configuration
|
- name: Copy tmux configuration
|
||||||
copy:
|
copy:
|
||||||
src: files/tmux.conf
|
src: tmux.conf
|
||||||
dest: /home/eric/.tmux.conf
|
dest: /home/eric/.tmux.conf
|
||||||
|
|
||||||
- name: Copy git configuration
|
- name: Copy git configuration
|
||||||
copy:
|
copy:
|
||||||
src: files/gitconfig
|
src: gitconfig
|
||||||
dest: /home/eric/.gitconfig
|
dest: /home/eric/.gitconfig
|
||||||
|
|
||||||
- name: Create local configuration directory
|
- name: Create local configuration directory
|
||||||
@ -36,6 +37,6 @@
|
|||||||
|
|
||||||
- name: Copy neovim configuration
|
- name: Copy neovim configuration
|
||||||
copy:
|
copy:
|
||||||
src: files/init.lua
|
src: init.lua
|
||||||
dest: /home/eric/.config/nvim/init.lua
|
dest: /home/eric/.config/nvim/init.lua
|
||||||
|
|
||||||
|
38
roles/ericomeehan.gondwanamc.com/README.md
Normal file
38
roles/ericomeehan.gondwanamc.com/README.md
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
Role Name
|
||||||
|
=========
|
||||||
|
|
||||||
|
A brief description of the role goes here.
|
||||||
|
|
||||||
|
Requirements
|
||||||
|
------------
|
||||||
|
|
||||||
|
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
|
||||||
|
|
||||||
|
Role Variables
|
||||||
|
--------------
|
||||||
|
|
||||||
|
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
|
||||||
|
|
||||||
|
Dependencies
|
||||||
|
------------
|
||||||
|
|
||||||
|
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
|
||||||
|
|
||||||
|
Example Playbook
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
|
||||||
|
|
||||||
|
- hosts: servers
|
||||||
|
roles:
|
||||||
|
- { role: username.rolename, x: 42 }
|
||||||
|
|
||||||
|
License
|
||||||
|
-------
|
||||||
|
|
||||||
|
BSD
|
||||||
|
|
||||||
|
Author Information
|
||||||
|
------------------
|
||||||
|
|
||||||
|
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
|
52
roles/ericomeehan.gondwanamc.com/meta/main.yml
Normal file
52
roles/ericomeehan.gondwanamc.com/meta/main.yml
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
galaxy_info:
|
||||||
|
author: your name
|
||||||
|
description: your role description
|
||||||
|
company: your company (optional)
|
||||||
|
|
||||||
|
# If the issue tracker for your role is not on github, uncomment the
|
||||||
|
# next line and provide a value
|
||||||
|
# issue_tracker_url: http://example.com/issue/tracker
|
||||||
|
|
||||||
|
# Choose a valid license ID from https://spdx.org - some suggested licenses:
|
||||||
|
# - BSD-3-Clause (default)
|
||||||
|
# - MIT
|
||||||
|
# - GPL-2.0-or-later
|
||||||
|
# - GPL-3.0-only
|
||||||
|
# - Apache-2.0
|
||||||
|
# - CC-BY-4.0
|
||||||
|
license: license (GPL-2.0-or-later, MIT, etc)
|
||||||
|
|
||||||
|
min_ansible_version: 2.1
|
||||||
|
|
||||||
|
# If this a Container Enabled role, provide the minimum Ansible Container version.
|
||||||
|
# min_ansible_container_version:
|
||||||
|
|
||||||
|
#
|
||||||
|
# Provide a list of supported platforms, and for each platform a list of versions.
|
||||||
|
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
|
||||||
|
# To view available platforms and versions (or releases), visit:
|
||||||
|
# https://galaxy.ansible.com/api/v1/platforms/
|
||||||
|
#
|
||||||
|
# platforms:
|
||||||
|
# - name: Fedora
|
||||||
|
# versions:
|
||||||
|
# - all
|
||||||
|
# - 25
|
||||||
|
# - name: SomePlatform
|
||||||
|
# versions:
|
||||||
|
# - all
|
||||||
|
# - 1.0
|
||||||
|
# - 7
|
||||||
|
# - 99.99
|
||||||
|
|
||||||
|
galaxy_tags: []
|
||||||
|
# List tags for your role here, one per line. A tag is a keyword that describes
|
||||||
|
# and categorizes the role. Users find roles by searching for tags. Be sure to
|
||||||
|
# remove the '[]' above, if you add tags to this list.
|
||||||
|
#
|
||||||
|
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
|
||||||
|
# Maximum 20 tags per role.
|
||||||
|
|
||||||
|
dependencies: []
|
||||||
|
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
|
||||||
|
# if you add dependencies to this list.
|
122
roles/ericomeehan.gondwanamc.com/tasks/deploy-production.yml
Normal file
122
roles/ericomeehan.gondwanamc.com/tasks/deploy-production.yml
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
---
|
||||||
|
# tasks file for deploy-production.yml
|
||||||
|
- name: Create persistent volume for gondwanamc production
|
||||||
|
k8s:
|
||||||
|
state: present
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: pv-gondwanamc-production
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: 8Gi
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
persistentVolumeReclaimPolicy: Retain
|
||||||
|
storageClassName: standard
|
||||||
|
hostPath:
|
||||||
|
path: /data/store-0/pv-gondwanamc-production
|
||||||
|
nodeAffinity:
|
||||||
|
required:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: kubernetes.io/hostname
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- alpha-worker-0
|
||||||
|
|
||||||
|
- name: Unpack gondwanamc world data to the production persistent volume
|
||||||
|
unpack:
|
||||||
|
src: Gondwana.tar.gz
|
||||||
|
dest: /data/store-0/pv-gondwanamc-production
|
||||||
|
copy: true
|
||||||
|
|
||||||
|
- name: Copy server properties to production persistent volume
|
||||||
|
copy:
|
||||||
|
src: server.properties
|
||||||
|
dest: /data/store-0/pv-gondwanamc-production
|
||||||
|
|
||||||
|
- name: Copy whitelist to production persistent volume
|
||||||
|
copy:
|
||||||
|
src: whitelist.json
|
||||||
|
dest: /data/store-0/pv-gondwanamc-production
|
||||||
|
|
||||||
|
- name: Create persistent volume claim for gondwanamc production volume
|
||||||
|
k8s:
|
||||||
|
state: present
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: pv-claim-gondwanamc-production
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 8Gi
|
||||||
|
storageClassName: standard
|
||||||
|
volumeName: pv-gondwanamc-production
|
||||||
|
|
||||||
|
- name: Create a production Deployment
|
||||||
|
k8s:
|
||||||
|
definition:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: minecraft-deployment
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: gondwanamc.com
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: gondwanamc.com
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: openminecraft
|
||||||
|
image: itzg/minecraft-server
|
||||||
|
volumeMounts:
|
||||||
|
- name: pv-gondwanamc-production
|
||||||
|
mountPath: /data
|
||||||
|
ports:
|
||||||
|
- containerPort: 25565
|
||||||
|
- containerPort: 24454
|
||||||
|
env:
|
||||||
|
- name: EULA
|
||||||
|
value: "TRUE"
|
||||||
|
- name: TYPE
|
||||||
|
value: "FABRIC"
|
||||||
|
- name: MODS
|
||||||
|
value: "https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/fabric,https://cdn.modrinth.com/data/bWrNNfkb/versions/D4KXqjtC/Floodgate-Fabric-2.2.3-SNAPSHOT%2Bbuild.28.jar,https://www.curseforge.com/api/v1/mods/306612/files/5510851/download,https://www.curseforge.com/api/v1/mods/416089/files/5500955/download"
|
||||||
|
volumes:
|
||||||
|
- name: pv-gondwanamc-production
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: pv-claim-gondwanamc-production
|
||||||
|
|
||||||
|
- name: Expose Deployment as a Service in production
|
||||||
|
k8s:
|
||||||
|
definition:
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: service-gondwanamc-com
|
||||||
|
namespace: production
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: gondwanamc.com
|
||||||
|
ports:
|
||||||
|
- port: 24454
|
||||||
|
protocol: TCP
|
||||||
|
name: minecraft-port-24454
|
||||||
|
nodePort: "{{ nodePorts[gondwanamc-24454] }}"
|
||||||
|
- port: 25565
|
||||||
|
protocol: TCP
|
||||||
|
name: minecraft-port-25565
|
||||||
|
nodePort: "{{ nodePorts[gondwanamc-25565] }}"
|
||||||
|
type: NodePort
|
@ -1,22 +1,22 @@
|
|||||||
---
|
---
|
||||||
# tasks file for ericomeehan.minecraft.eom.dev
|
# tasks file for ericomeehan.minecraft.eom.dev
|
||||||
- name: Create persistent volume for minecraft
|
- name: Create persistent volume for gondwanamc testing
|
||||||
k8s:
|
k8s:
|
||||||
state: present
|
state: present
|
||||||
definition:
|
definition:
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolume
|
kind: PersistentVolume
|
||||||
metadata:
|
metadata:
|
||||||
name: minecraft-pv
|
name: pv-gondwanamc-testing
|
||||||
spec:
|
spec:
|
||||||
capacity:
|
capacity:
|
||||||
storage: 16Gi
|
storage: 1Gi
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
persistentVolumeReclaimPolicy: Retain
|
persistentVolumeReclaimPolicy: Retain
|
||||||
storageClassName: standard
|
storageClassName: standard
|
||||||
hostPath:
|
hostPath:
|
||||||
path: /mnt/data/minecraft-pv
|
path: /data/store-0/pv-gondwanamc-testing
|
||||||
nodeAffinity:
|
nodeAffinity:
|
||||||
required:
|
required:
|
||||||
nodeSelectorTerms:
|
nodeSelectorTerms:
|
||||||
@ -26,47 +26,47 @@
|
|||||||
values:
|
values:
|
||||||
- alpha-worker-0
|
- alpha-worker-0
|
||||||
|
|
||||||
- name: Create persistent volume claim for minecraft volume
|
- name: Create persistent volume claim for gondwanamc testing volume
|
||||||
k8s:
|
k8s:
|
||||||
state: present
|
state: present
|
||||||
definition:
|
definition:
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: minecraft-pv-claim
|
name: pv-claim-gondwanamc-testing
|
||||||
namespace: {{ namespace }}
|
namespace: testing
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 16Gi
|
storage: 1Gi
|
||||||
storageClassName: standard
|
storageClassName: standard
|
||||||
volumeName: minecraft-pv
|
volumeName: pv-gondwanamc-testing
|
||||||
|
|
||||||
- name: Create a Deployment
|
- name: Create a testing Deployment
|
||||||
k8s:
|
k8s:
|
||||||
definition:
|
definition:
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: minecraft-deployment
|
name: minecraft-deployment
|
||||||
namespace: {{ namespace }}
|
namespace: testing
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: minecraft
|
app: gondwanamc.com
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: minecraft
|
app: gondwanamc.com
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: openminecraft
|
- name: openminecraft
|
||||||
image: itzg/minecraft-server
|
image: itzg/minecraft-server
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: minecraft-pv
|
- name: pv-gondwanamc-testing
|
||||||
mountPath: /data
|
mountPath: /data
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 25565
|
- containerPort: 25565
|
||||||
@ -79,28 +79,26 @@
|
|||||||
- name: MODS
|
- name: MODS
|
||||||
value: "https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/fabric,https://cdn.modrinth.com/data/bWrNNfkb/versions/D4KXqjtC/Floodgate-Fabric-2.2.3-SNAPSHOT%2Bbuild.28.jar,https://www.curseforge.com/api/v1/mods/306612/files/5510851/download,https://www.curseforge.com/api/v1/mods/416089/files/5500955/download"
|
value: "https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/fabric,https://cdn.modrinth.com/data/bWrNNfkb/versions/D4KXqjtC/Floodgate-Fabric-2.2.3-SNAPSHOT%2Bbuild.28.jar,https://www.curseforge.com/api/v1/mods/306612/files/5510851/download,https://www.curseforge.com/api/v1/mods/416089/files/5500955/download"
|
||||||
volumes:
|
volumes:
|
||||||
- name: minecraft-pv
|
- name: pv-gondwanamc-testing
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: minecraft-pv-claim
|
claimName: pv-claim-gondwanamc-testing
|
||||||
|
|
||||||
- name: Expose Deployment as a Service
|
- name: Expose Deployment as a Service in testing
|
||||||
k8s:
|
k8s:
|
||||||
definition:
|
definition:
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: minecraft-service
|
name: service-gondwanamc-com
|
||||||
namespace: {{ namespace }}
|
namespace: testing
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
app: minecraft
|
app: gondwanamc.com
|
||||||
ports:
|
ports:
|
||||||
- port: 24454
|
- port: 24454
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
name: minecraft-port-24454
|
name: minecraft-port-24454
|
||||||
nodePort: {{ nodePorts[minecraft-port-24454] }}
|
|
||||||
- port: 25565
|
- port: 25565
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
name: minecraft-port-25565
|
name: minecraft-port-25565
|
||||||
nodePort: {{ nodePorts[minecraft-port-25565] }}
|
type: ClusterIP
|
||||||
type: NodePort
|
|
9
roles/ericomeehan.gondwanamc.com/tasks/main.yml
Normal file
9
roles/ericomeehan.gondwanamc.com/tasks/main.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
# tasks file for ericomeehan.gondwanamc
|
||||||
|
- name: Deploy to testing
|
||||||
|
include_tasks: deploy-testing.yml
|
||||||
|
when: target_namespace == "testing" or target_namespace == "both"
|
||||||
|
|
||||||
|
- name: Deploy to production
|
||||||
|
include_tasks: deploy-production.yml
|
||||||
|
when: target_namespace == "production" or target_namespace == "both"
|
2
roles/ericomeehan.gondwanamc.com/tests/inventory
Normal file
2
roles/ericomeehan.gondwanamc.com/tests/inventory
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
localhost
|
||||||
|
|
@ -1,3 +1,5 @@
|
|||||||
---
|
---
|
||||||
# defaults file for ericomeehan.nvidia_driver_debian
|
# defaults file for ericomeehan.nvidia_driver_debian
|
||||||
nvidia_driver_skip_reboot: false
|
nvidia_driver_skip_reboot: false
|
||||||
|
nvidia_driver_source: nvidia
|
||||||
|
nvidia_driver_tesla: false
|
||||||
|
@ -1,31 +1,9 @@
|
|||||||
---
|
---
|
||||||
# tasks file for ericomeehan.nvidia_driver_debian
|
# tasks file for ericomeehan.nvidia_driver_debian
|
||||||
- name: Add contrib & non-free repository
|
- name: Install Nvidia proprietary drivers
|
||||||
replace:
|
include_tasks: nvidia-proprietary.yml
|
||||||
dest: /etc/apt/sources.list
|
when: nvidia_driver_source == "nvidia"
|
||||||
regexp: '^(deb(?!.* contrib).*)'
|
|
||||||
replace: '\1 contrib non-free'
|
|
||||||
|
|
||||||
- name: Update apt
|
- name: Install nouveau and mesa drivers
|
||||||
become: yes
|
include_tasks: nouveau-mesa.yml
|
||||||
apt:
|
when: nvidia_driver_source == "nouveau"
|
||||||
update_cache: yes
|
|
||||||
|
|
||||||
- name: Install Linux headers
|
|
||||||
apt:
|
|
||||||
name: linux-headers-{{ ansible_kernel }}
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Install Nvidia and CUDA drivers
|
|
||||||
apt:
|
|
||||||
state: present
|
|
||||||
name:
|
|
||||||
- nvidia-driver
|
|
||||||
- firmware-misc-nonfree
|
|
||||||
- nvidia-cuda-dev
|
|
||||||
- nvidia-cuda-toolkit
|
|
||||||
register: install_driver
|
|
||||||
|
|
||||||
- name: Reboot after driver install
|
|
||||||
reboot:
|
|
||||||
when: install_driver.changed and not nvidia_driver_skip_reboot
|
|
||||||
|
@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
# tasks file for nouveau-mesa
|
||||||
|
- name: Update apt
|
||||||
|
become: yes
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
|
||||||
|
- name: Install nouveau and mesa
|
||||||
|
apt:
|
||||||
|
state: present
|
||||||
|
name:
|
||||||
|
- xserver-xorg-video-nouveau
|
||||||
|
- mesa-utils
|
||||||
|
register: install_driver
|
||||||
|
|
||||||
|
- name: Reboot after driver install
|
||||||
|
reboot:
|
||||||
|
when: install_driver.changed and not nvidia_driver_skip_reboot
|
@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
# tasks file for nvidia-proprietary
|
||||||
|
- name: Add contrib & non-free repository
|
||||||
|
replace:
|
||||||
|
dest: /etc/apt/sources.list
|
||||||
|
regexp: '^(deb(?!.* contrib).*)'
|
||||||
|
replace: '\1 contrib non-free'
|
||||||
|
|
||||||
|
- name: Update apt
|
||||||
|
become: yes
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
|
||||||
|
- name: Install Linux headers
|
||||||
|
apt:
|
||||||
|
name: linux-headers-{{ ansible_kernel }}
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Install Nvidia and CUDA drivers
|
||||||
|
apt:
|
||||||
|
state: present
|
||||||
|
name:
|
||||||
|
- nvidia-driver
|
||||||
|
- firmware-misc-nonfree
|
||||||
|
- nvidia-cuda-dev
|
||||||
|
- nvidia-cuda-toolkit
|
||||||
|
register: install_driver
|
||||||
|
|
||||||
|
- name: Install tesla drivers
|
||||||
|
apt:
|
||||||
|
state: present
|
||||||
|
name:
|
||||||
|
- nvidia-tesla-470-driver
|
||||||
|
when: nvidia_driver_tesla == true
|
||||||
|
|
||||||
|
- name: Reboot after driver install
|
||||||
|
reboot:
|
||||||
|
when: install_driver.changed and not nvidia_driver_skip_reboot
|
15
roles/nvidia.nvidia_driver/.github/workflows/molecule.yml
vendored
Normal file
15
roles/nvidia.nvidia_driver/.github/workflows/molecule.yml
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
on:
|
||||||
|
- push
|
||||||
|
- pull_request
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
path: "${{ github.repository }}"
|
||||||
|
- name: molecule
|
||||||
|
uses: robertdebock/molecule-action@2.7.2
|
2
roles/nvidia.nvidia_driver/.gitignore
vendored
Normal file
2
roles/nvidia.nvidia_driver/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
*.retry
|
||||||
|
.idea/
|
25
roles/nvidia.nvidia_driver/LICENSE
Normal file
25
roles/nvidia.nvidia_driver/LICENSE
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
* Neither the name of NVIDIA CORPORATION nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived
|
||||||
|
from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
|
||||||
|
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||||
|
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
77
roles/nvidia.nvidia_driver/README.md
Normal file
77
roles/nvidia.nvidia_driver/README.md
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
# ansible-role-nvidia-driver
|
||||||
|
|
||||||
|
An Ansible role to install the NVIDIA driver from the NVIDIA CUDA repositories.
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
In the process of installing the NVIDIA driver, this role will reboot the nodes where it runs.
|
||||||
|
Because of this, we strongly recommend that you run `ansible-playbook` from a separate node than the GPU nodes where you are installing the driver.
|
||||||
|
|
||||||
|
If you attempt to run Ansible on the same node where you are installing the driver, this role will either:
|
||||||
|
|
||||||
|
* Refuse to proceed with an error like `Running reboot with local connection would reboot the control node` (if running with the `local` connection)
|
||||||
|
* Reboot the node you're running on, interrupting the playbook execution! (if running the an `ssh` connection against localhost)
|
||||||
|
|
||||||
|
## Installing
|
||||||
|
|
||||||
|
This role can be installed using [Ansible Galaxy](https://galaxy.ansible.com/nvidia/nvidia_driver):
|
||||||
|
|
||||||
|
```
|
||||||
|
$ ansible-galaxy install nvidia.nvidia_driver
|
||||||
|
```
|
||||||
|
|
||||||
|
## Role variables
|
||||||
|
|
||||||
|
|
||||||
|
| Variable | Default value | Description |
|
||||||
|
|-------------------------------------|---------------------------------|-----------------------------------------------------------------------------------------------------------------------|
|
||||||
|
| `nvidia_driver_package_state` | `"present"` | Package state for NVIDIA driver packages |
|
||||||
|
| `nvidia_driver_package_version` | `""` | Package version to install. Note that this should match the actual version of the deb or RPM package to be installed. |
|
||||||
|
| `nvidia_driver_persistence_mode_on` | `yes` | Whether to enable persistence mode (boolean) |
|
||||||
|
| `nvidia_driver_skip_reboot` | `no` | Whether to skip rebooting the node during the install |
|
||||||
|
| `nvidia_driver_module_file` | `"/etc/modprobe.d/nvidia.conf"` | Filename to use for NVIDIA driver parameters |
|
||||||
|
| `nvidia_driver_module_params` | `""` | Parameters to pass to the NVIDIA driver |
|
||||||
|
| `nvidia_driver_branch` | `"515"` | Default driver branch to install |
|
||||||
|
|
||||||
|
### Red Hat specific variables
|
||||||
|
|
||||||
|
|
||||||
|
| Variable | Default value | Description |
|
||||||
|
|----------------------------------------|-------------------------------------------------------------------------------------------------------------------|-----------------------------------|
|
||||||
|
| `epel_package` | `"https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm"` | Package to install to enable EPEL |
|
||||||
|
| `nvidia_driver_rhel_cuda_repo_baseurl` | `"https://developer.download.nvidia.com/compute/cuda/repos/{{ _rhel_repo_dir }}/"` | Base URL to use for CUDA repo |
|
||||||
|
| `nvidia_driver_rhel_cuda_repo_gpgkey` | `"https://developer.download.nvidia.com/compute/cuda/repos/{{ _rhel_repo_dir }}/7fa2af80.pub"` | GPG key for the CUDA repo |
|
||||||
|
|
||||||
|
### Ubuntu specific variables
|
||||||
|
|
||||||
|
For Ubuntu installs, you have the choice of installing from the Canonical repositories and the NVIDIA CUDA repositories.
|
||||||
|
|
||||||
|
By default, the Canonical repositories will be used, and the driver installed will be the headless server driver.
|
||||||
|
|
||||||
|
| Variable | Default value | Description |
|
||||||
|
|-----------------------------------------------|------------------------------------------------------------------------------------|------------------------------------------------------|
|
||||||
|
| `nvidia_driver_ubuntu_install_from_cuda_repo` | `no` | Flag whether to use the CUDA repo |
|
||||||
|
| `nvidia_driver_ubuntu_cuda_repo_baseurl` | `"http://developer.download.nvidia.com/compute/cuda/repos/{{ _ubuntu_repo_dir }}"` | Base URL to use for CUDA repo |
|
||||||
|
| `nvidia_driver_ubuntu_cuda_package` | `"cuda-drivers"` | Package name to install from CUDA repo |
|
||||||
|
| `nvidia_driver_ubuntu_packages_suffix` | `"-server"` | The suffix added to the apt packages when installing |
|
||||||
|
|
||||||
|
## Example playbook
|
||||||
|
|
||||||
|
```
|
||||||
|
- hosts: gpu_nodes
|
||||||
|
roles:
|
||||||
|
- nvidia.nvidia_driver
|
||||||
|
```
|
||||||
|
|
||||||
|
## Supported distributions
|
||||||
|
|
||||||
|
Currently, this role supports the following Linux distributions:
|
||||||
|
|
||||||
|
* NVIDIA DGX OS 4
|
||||||
|
* NVIDIA DGX OS 5
|
||||||
|
* Ubuntu 18.04 LTS
|
||||||
|
* Ubuntu 20.04 LTS
|
||||||
|
* CentOS 7
|
||||||
|
* Red Hat Enterprise Linux 7
|
||||||
|
* CentOS 8
|
||||||
|
* Red Hat Enterprise Linux 8
|
46
roles/nvidia.nvidia_driver/defaults/main.yml
Normal file
46
roles/nvidia.nvidia_driver/defaults/main.yml
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
nvidia_driver_package_state: present
|
||||||
|
nvidia_driver_package_version: ''
|
||||||
|
nvidia_driver_persistence_mode_on: yes
|
||||||
|
nvidia_driver_skip_reboot: no
|
||||||
|
nvidia_driver_module_file: /etc/modprobe.d/nvidia.conf
|
||||||
|
nvidia_driver_module_params: ''
|
||||||
|
nvidia_driver_add_repos: yes
|
||||||
|
nvidia_driver_branch: "515"
|
||||||
|
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# RedHat family #
|
||||||
|
##############################################################################
|
||||||
|
epel_package: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm"
|
||||||
|
epel_repo_key: "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }}"
|
||||||
|
nvidia_driver_rhel_cuda_repo_baseurl: "https://developer.download.nvidia.com/compute/cuda/repos/{{ _rhel_repo_dir }}/"
|
||||||
|
nvidia_driver_rhel_cuda_repo_gpgkey: "https://developer.download.nvidia.com/compute/cuda/repos/{{ _rhel_repo_dir }}/D42D0685.pub"
|
||||||
|
|
||||||
|
nvidia_driver_rhel_branch: "{{ nvidia_driver_branch }}"
|
||||||
|
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Ubuntu #
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
# Driver branch to install with Ubuntu
|
||||||
|
nvidia_driver_ubuntu_branch: "{{ nvidia_driver_branch }}"
|
||||||
|
|
||||||
|
# Determine if we should install from CUDA repo instead of Canonical repos
|
||||||
|
nvidia_driver_ubuntu_install_from_cuda_repo: no
|
||||||
|
|
||||||
|
nvidia_driver_ubuntu_packages_suffix: "-server"
|
||||||
|
|
||||||
|
# Installing with Canonical repositories
|
||||||
|
nvidia_driver_ubuntu_packages:
|
||||||
|
- "nvidia-headless-{{ nvidia_driver_ubuntu_branch }}{{ nvidia_driver_ubuntu_packages_suffix }}"
|
||||||
|
- "nvidia-utils-{{ nvidia_driver_ubuntu_branch }}{{ nvidia_driver_ubuntu_packages_suffix }}"
|
||||||
|
- "nvidia-headless-no-dkms-{{ nvidia_driver_ubuntu_branch }}{{ nvidia_driver_ubuntu_packages_suffix }}"
|
||||||
|
- "nvidia-kernel-source-{{ nvidia_driver_ubuntu_branch }}{{ nvidia_driver_ubuntu_packages_suffix }}"
|
||||||
|
|
||||||
|
# Installing with CUDA repositories
|
||||||
|
old_nvidia_driver_ubuntu_cuda_repo_gpgkey_id: "7fa2af80"
|
||||||
|
nvidia_driver_ubuntu_cuda_repo_baseurl: "https://developer.download.nvidia.com/compute/cuda/repos/{{ _ubuntu_repo_dir }}"
|
||||||
|
nvidia_driver_ubuntu_cuda_keyring_package: "cuda-keyring_1.0-1_all.deb"
|
||||||
|
nvidia_driver_ubuntu_cuda_keyring_url: "{{ nvidia_driver_ubuntu_cuda_repo_baseurl }}/{{ nvidia_driver_ubuntu_cuda_keyring_package }}"
|
||||||
|
nvidia_driver_ubuntu_cuda_package: "cuda-drivers-{{ nvidia_driver_ubuntu_branch }}"
|
@ -0,0 +1,3 @@
|
|||||||
|
[Service]
|
||||||
|
ExecStart=
|
||||||
|
ExecStart=/usr/bin/nvidia-persistenced --user root --persistence-mode --verbose
|
2
roles/nvidia.nvidia_driver/meta/.galaxy_install_info
Normal file
2
roles/nvidia.nvidia_driver/meta/.galaxy_install_info
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
install_date: 'Tue 09 Jul 2024 03:06:23 PM '
|
||||||
|
version: v2.3.0
|
24
roles/nvidia.nvidia_driver/meta/main.yml
Normal file
24
roles/nvidia.nvidia_driver/meta/main.yml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
galaxy_info:
|
||||||
|
namespace: nvidia
|
||||||
|
role_name: nvidia_driver
|
||||||
|
author: Luke Yeager
|
||||||
|
company: NVIDIA
|
||||||
|
description: Install the NVIDIA driver
|
||||||
|
license: 3-Clause BSD
|
||||||
|
min_ansible_version: 2.7
|
||||||
|
|
||||||
|
platforms:
|
||||||
|
- name: Ubuntu
|
||||||
|
versions:
|
||||||
|
- 'xenial'
|
||||||
|
- 'bionic'
|
||||||
|
- 'focal'
|
||||||
|
- name: EL
|
||||||
|
versions:
|
||||||
|
- '7'
|
||||||
|
- '8'
|
||||||
|
|
||||||
|
galaxy_tags:
|
||||||
|
- 'nvidia'
|
||||||
|
- 'cuda'
|
||||||
|
- 'driver'
|
7
roles/nvidia.nvidia_driver/molecule/default/converge.yml
Normal file
7
roles/nvidia.nvidia_driver/molecule/default/converge.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- name: Converge
|
||||||
|
hosts: all
|
||||||
|
tasks:
|
||||||
|
- name: "Include ansible-role-nvidia-driver"
|
||||||
|
include_role:
|
||||||
|
name: "ansible-role-nvidia-driver"
|
117
roles/nvidia.nvidia_driver/molecule/default/molecule.yml
Normal file
117
roles/nvidia.nvidia_driver/molecule/default/molecule.yml
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
---
|
||||||
|
dependency:
|
||||||
|
name: galaxy
|
||||||
|
driver:
|
||||||
|
name: docker
|
||||||
|
platforms:
|
||||||
|
|
||||||
|
- name: ubuntu-1804-canonical
|
||||||
|
image: geerlingguy/docker-ubuntu1804-ansible
|
||||||
|
volumes:
|
||||||
|
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||||
|
command: /sbin/init
|
||||||
|
pre_build_image: true
|
||||||
|
privileged: true
|
||||||
|
groups:
|
||||||
|
- canonical_repo
|
||||||
|
- ubuntu
|
||||||
|
|
||||||
|
- name: ubuntu-1804-cuda
|
||||||
|
image: geerlingguy/docker-ubuntu1804-ansible
|
||||||
|
volumes:
|
||||||
|
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||||
|
command: /sbin/init
|
||||||
|
pre_build_image: true
|
||||||
|
privileged: true
|
||||||
|
groups:
|
||||||
|
- cuda_repo
|
||||||
|
- ubuntu
|
||||||
|
|
||||||
|
- name: ubuntu-2004-canonical-server
|
||||||
|
image: geerlingguy/docker-ubuntu2004-ansible
|
||||||
|
volumes:
|
||||||
|
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||||
|
command: /sbin/init
|
||||||
|
pre_build_image: true
|
||||||
|
privileged: true
|
||||||
|
groups:
|
||||||
|
- canonical_repo
|
||||||
|
- ubuntu
|
||||||
|
|
||||||
|
- name: ubuntu-2004-canonical-noserver
|
||||||
|
image: geerlingguy/docker-ubuntu2004-ansible
|
||||||
|
volumes:
|
||||||
|
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||||
|
command: /sbin/init
|
||||||
|
pre_build_image: true
|
||||||
|
privileged: true
|
||||||
|
groups:
|
||||||
|
- canonical_repo
|
||||||
|
- canonical_repo_noserver
|
||||||
|
- ubuntu
|
||||||
|
|
||||||
|
- name: ubuntu-2004-cuda
|
||||||
|
image: geerlingguy/docker-ubuntu2004-ansible
|
||||||
|
volumes:
|
||||||
|
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||||
|
command: /sbin/init
|
||||||
|
pre_build_image: true
|
||||||
|
privileged: true
|
||||||
|
groups:
|
||||||
|
- cuda_repo
|
||||||
|
- ubuntu
|
||||||
|
|
||||||
|
- name: ubuntu-2204-canonical
|
||||||
|
image: geerlingguy/docker-ubuntu2204-ansible
|
||||||
|
volumes:
|
||||||
|
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||||
|
command: /sbin/init
|
||||||
|
pre_build_image: true
|
||||||
|
privileged: true
|
||||||
|
groups:
|
||||||
|
- canonical_repo
|
||||||
|
- ubuntu
|
||||||
|
|
||||||
|
- name: ubuntu-2204-cuda
|
||||||
|
image: geerlingguy/docker-ubuntu2204-ansible
|
||||||
|
volumes:
|
||||||
|
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||||
|
command: /sbin/init
|
||||||
|
pre_build_image: true
|
||||||
|
privileged: true
|
||||||
|
groups:
|
||||||
|
- cuda_repo
|
||||||
|
- ubuntu
|
||||||
|
|
||||||
|
- name: centos-7
|
||||||
|
image: geerlingguy/docker-centos7-ansible
|
||||||
|
volumes:
|
||||||
|
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||||
|
command: /sbin/init
|
||||||
|
pre_build_image: true
|
||||||
|
privileged: true
|
||||||
|
|
||||||
|
# - name: centos-8
|
||||||
|
# image: geerlingguy/docker-centos8-ansible
|
||||||
|
# volumes:
|
||||||
|
# - /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||||
|
# command: /sbin/init
|
||||||
|
# pre_build_image: true
|
||||||
|
# privileged: true
|
||||||
|
|
||||||
|
provisioner:
|
||||||
|
name: ansible
|
||||||
|
ansible_args:
|
||||||
|
- -vv
|
||||||
|
inventory:
|
||||||
|
group_vars:
|
||||||
|
all:
|
||||||
|
nvidia_driver_skip_reboot: true
|
||||||
|
canonical_repo:
|
||||||
|
nvidia_driver_ubuntu_install_from_cuda_repo: false
|
||||||
|
canonical_repo_noserver:
|
||||||
|
nvidia_driver_ubuntu_packages_suffix: ""
|
||||||
|
cuda_repo:
|
||||||
|
nvidia_driver_ubuntu_install_from_cuda_repo: true
|
||||||
|
verifier:
|
||||||
|
name: ansible
|
10
roles/nvidia.nvidia_driver/molecule/default/prepare.yml
Normal file
10
roles/nvidia.nvidia_driver/molecule/default/prepare.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
- hosts: ubuntu
|
||||||
|
become: yes
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
- name: update apt cache and install gpg-agent
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
name: gpg-agent
|
||||||
|
state: present
|
10
roles/nvidia.nvidia_driver/molecule/default/verify.yml
Normal file
10
roles/nvidia.nvidia_driver/molecule/default/verify.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
# This is an example playbook to execute Ansible tests.
|
||||||
|
|
||||||
|
- name: Verify
|
||||||
|
hosts: all
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- name: Example assertion
|
||||||
|
assert:
|
||||||
|
that: true
|
89
roles/nvidia.nvidia_driver/tasks/install-redhat.yml
Normal file
89
roles/nvidia.nvidia_driver/tasks/install-redhat.yml
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
---
|
||||||
|
# We have to do this because the CentOS mirrors don't keep kernel-headers, etc
|
||||||
|
# for older kernels.
|
||||||
|
- name: ensure we have kernel-headers installed for the current kernel
|
||||||
|
block:
|
||||||
|
- name: attempt to install kernel support packages for current version
|
||||||
|
yum:
|
||||||
|
name:
|
||||||
|
- "kernel-headers-{{ ansible_kernel }}"
|
||||||
|
- "kernel-tools-{{ ansible_kernel }}"
|
||||||
|
- "kernel-tools-libs-{{ ansible_kernel }}"
|
||||||
|
- "kernel-devel-{{ ansible_kernel }}"
|
||||||
|
- "kernel-debug-devel-{{ ansible_kernel }}"
|
||||||
|
state: present
|
||||||
|
environment: "{{proxy_env if proxy_env is defined else {}}}"
|
||||||
|
rescue:
|
||||||
|
- name: update the kernel to latest version so we have a supported version
|
||||||
|
yum:
|
||||||
|
name:
|
||||||
|
- "kernel"
|
||||||
|
- "kernel-headers"
|
||||||
|
- "kernel-tools"
|
||||||
|
- "kernel-tools-libs"
|
||||||
|
- "kernel-devel"
|
||||||
|
- "kernel-debug-devel"
|
||||||
|
state: latest
|
||||||
|
environment: "{{proxy_env if proxy_env is defined else {}}}"
|
||||||
|
- name: reboot to pick up the new kernel
|
||||||
|
reboot:
|
||||||
|
when: not nvidia_driver_skip_reboot
|
||||||
|
|
||||||
|
- name: add epel repo gpg key
|
||||||
|
rpm_key:
|
||||||
|
key: "{{ epel_repo_key }}"
|
||||||
|
state: present
|
||||||
|
when: nvidia_driver_add_repos | bool
|
||||||
|
|
||||||
|
- name: add epel repo
|
||||||
|
become: true
|
||||||
|
yum:
|
||||||
|
name:
|
||||||
|
- "{{ epel_package }}"
|
||||||
|
state: latest
|
||||||
|
environment: "{{proxy_env if proxy_env is defined else {}}}"
|
||||||
|
when: nvidia_driver_add_repos | bool
|
||||||
|
|
||||||
|
- name: install dependencies
|
||||||
|
yum:
|
||||||
|
name: dkms
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: blacklist nouveau
|
||||||
|
kernel_blacklist:
|
||||||
|
name: nouveau
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: add repo
|
||||||
|
yum_repository:
|
||||||
|
name: cuda
|
||||||
|
description: NVIDIA CUDA YUM Repo
|
||||||
|
baseurl: "{{ nvidia_driver_rhel_cuda_repo_baseurl }}"
|
||||||
|
gpgkey: "{{ nvidia_driver_rhel_cuda_repo_gpgkey }}"
|
||||||
|
environment: "{{proxy_env if proxy_env is defined else {}}}"
|
||||||
|
when: nvidia_driver_add_repos | bool
|
||||||
|
|
||||||
|
- name: install driver packages RHEL/CentOS 7 and older
|
||||||
|
yum:
|
||||||
|
name: "{{ nvidia_driver_package_version | ternary('nvidia-driver-latest-dkms-'+nvidia_driver_package_version, 'nvidia-driver-branch-'+nvidia_driver_rhel_branch) }}"
|
||||||
|
state: "{{ nvidia_driver_package_state }}"
|
||||||
|
autoremove: "{{ nvidia_driver_package_state == 'absent' }}"
|
||||||
|
register: install_driver_rhel7
|
||||||
|
environment: "{{proxy_env if proxy_env is defined else {}}}"
|
||||||
|
when: ansible_distribution_major_version < '8'
|
||||||
|
|
||||||
|
- name: install driver packages RHEL/CentOS 8 and newer
|
||||||
|
dnf:
|
||||||
|
name: "{{ nvidia_driver_package_version | ternary('@nvidia-driver:'+nvidia_driver_package_version, '@nvidia-driver:'+nvidia_driver_rhel_branch+'-dkms') }}"
|
||||||
|
state: "{{ nvidia_driver_package_state }}"
|
||||||
|
autoremove: "{{ nvidia_driver_package_state == 'absent' }}"
|
||||||
|
register: install_driver_rhel8
|
||||||
|
environment: "{{proxy_env if proxy_env is defined else {}}}"
|
||||||
|
when: ansible_distribution_major_version > '7'
|
||||||
|
|
||||||
|
- name: Set install_driver.changed var for RHEL 7/8
|
||||||
|
debug:
|
||||||
|
msg: Driver installed for RHEL
|
||||||
|
when: install_driver_rhel7.changed or install_driver_rhel8.changed
|
||||||
|
register: install_driver
|
||||||
|
changed_when: install_driver_rhel7.changed or install_driver_rhel8.changed
|
@ -0,0 +1,43 @@
|
|||||||
|
---
|
||||||
|
- name: remove ppa
|
||||||
|
apt_repository:
|
||||||
|
repo: ppa:graphics-drivers/ppa
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- name: remove old signing key
|
||||||
|
apt_key:
|
||||||
|
id: "{{ old_nvidia_driver_ubuntu_cuda_repo_gpgkey_id }}"
|
||||||
|
state: absent
|
||||||
|
environment: "{{proxy_env if proxy_env is defined else {}}}"
|
||||||
|
when: nvidia_driver_add_repos | bool
|
||||||
|
|
||||||
|
- name: add CUDA keyring
|
||||||
|
apt:
|
||||||
|
deb: "{{ nvidia_driver_ubuntu_cuda_keyring_url }}"
|
||||||
|
state: "present"
|
||||||
|
environment: "{{proxy_env if proxy_env is defined else {}}}"
|
||||||
|
when: nvidia_driver_add_repos | bool
|
||||||
|
|
||||||
|
- name: force an apt update
|
||||||
|
apt:
|
||||||
|
update_cache: true
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
|
- name: ensure kmod is installed
|
||||||
|
apt:
|
||||||
|
name: "kmod"
|
||||||
|
state: "present"
|
||||||
|
|
||||||
|
- name: blacklist nouveau
|
||||||
|
kernel_blacklist:
|
||||||
|
name: nouveau
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: install driver packages
|
||||||
|
apt:
|
||||||
|
name: "{{ nvidia_driver_package_version | ternary(nvidia_driver_ubuntu_cuda_package+'='+nvidia_driver_package_version, nvidia_driver_ubuntu_cuda_package) }}"
|
||||||
|
state: "{{ nvidia_driver_package_state }}"
|
||||||
|
autoremove: "{{ nvidia_driver_package_state == 'absent' }}"
|
||||||
|
purge: "{{ nvidia_driver_package_state == 'absent' }}"
|
||||||
|
register: install_driver
|
||||||
|
environment: "{{proxy_env if proxy_env is defined else {}}}"
|
15
roles/nvidia.nvidia_driver/tasks/install-ubuntu.yml
Normal file
15
roles/nvidia.nvidia_driver/tasks/install-ubuntu.yml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
- name: remove ppa
|
||||||
|
apt_repository:
|
||||||
|
repo: ppa:graphics-drivers/ppa
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- name: install driver packages
|
||||||
|
apt:
|
||||||
|
name: "{{ nvidia_driver_package_version | ternary(item+'='+nvidia_driver_package_version, item) }}"
|
||||||
|
state: "{{ nvidia_driver_package_state }}"
|
||||||
|
autoremove: "{{ nvidia_driver_package_state == 'absent' }}"
|
||||||
|
purge: "{{ nvidia_driver_package_state == 'absent' }}"
|
||||||
|
loop: "{{ nvidia_driver_ubuntu_packages }}"
|
||||||
|
register: install_driver
|
||||||
|
environment: "{{proxy_env if proxy_env is defined else {}}}"
|
52
roles/nvidia.nvidia_driver/tasks/main.yml
Normal file
52
roles/nvidia.nvidia_driver/tasks/main.yml
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
---
|
||||||
|
- name: unload nouveau
|
||||||
|
modprobe:
|
||||||
|
name: nouveau
|
||||||
|
state: absent
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
|
- name: ubuntu install tasks (canonical repos)
|
||||||
|
include_tasks: install-ubuntu.yml
|
||||||
|
when: ansible_distribution == 'Ubuntu' and (not nvidia_driver_ubuntu_install_from_cuda_repo)
|
||||||
|
|
||||||
|
- name: ubuntu install tasks (CUDA repo)
|
||||||
|
include_tasks: install-ubuntu-cuda-repo.yml
|
||||||
|
when: ansible_distribution == 'Ubuntu' and nvidia_driver_ubuntu_install_from_cuda_repo
|
||||||
|
|
||||||
|
- name: redhat family install tasks
|
||||||
|
include_tasks: install-redhat.yml
|
||||||
|
when: ansible_os_family == 'RedHat'
|
||||||
|
|
||||||
|
- name: create persistenced override dir
|
||||||
|
file:
|
||||||
|
path: /etc/systemd/system/nvidia-persistenced.service.d/
|
||||||
|
state: directory
|
||||||
|
recurse: yes
|
||||||
|
|
||||||
|
- name: configure persistenced service to turn on persistence mode
|
||||||
|
copy:
|
||||||
|
src: nvidia-persistenced-override.conf
|
||||||
|
dest: /etc/systemd/system/nvidia-persistenced.service.d/override.conf
|
||||||
|
when: nvidia_driver_persistence_mode_on
|
||||||
|
|
||||||
|
- name: remove persistenced service override
|
||||||
|
file:
|
||||||
|
path: /etc/systemd/system/nvidia-persistenced.service.d/override.conf
|
||||||
|
state: absent
|
||||||
|
when: not nvidia_driver_persistence_mode_on
|
||||||
|
|
||||||
|
- name: enable persistenced
|
||||||
|
systemd:
|
||||||
|
name: nvidia-persistenced
|
||||||
|
enabled: yes
|
||||||
|
when: nvidia_driver_package_state != 'absent'
|
||||||
|
|
||||||
|
- name: set module parameters
|
||||||
|
template:
|
||||||
|
src: nvidia.conf.j2
|
||||||
|
dest: "{{ nvidia_driver_module_file }}"
|
||||||
|
mode: '0644'
|
||||||
|
|
||||||
|
- name: reboot after driver install
|
||||||
|
reboot:
|
||||||
|
when: install_driver.changed and not nvidia_driver_skip_reboot
|
1
roles/nvidia.nvidia_driver/templates/nvidia.conf.j2
Normal file
1
roles/nvidia.nvidia_driver/templates/nvidia.conf.j2
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ nvidia_driver_module_params }}
|
6
roles/nvidia.nvidia_driver/tests/README.md
Normal file
6
roles/nvidia.nvidia_driver/tests/README.md
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
Test like this:
|
||||||
|
```
|
||||||
|
ansible-playbook --inventory tests/inventory.yml tests/playbook.yml
|
||||||
|
```
|
||||||
|
By default, the test inventory operates on the localhost.
|
||||||
|
You may want to change this.
|
1
roles/nvidia.nvidia_driver/tests/inventory
Normal file
1
roles/nvidia.nvidia_driver/tests/inventory
Normal file
@ -0,0 +1 @@
|
|||||||
|
localhost
|
5
roles/nvidia.nvidia_driver/tests/playbook.yml
Normal file
5
roles/nvidia.nvidia_driver/tests/playbook.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
- hosts: all
|
||||||
|
become: yes
|
||||||
|
roles:
|
||||||
|
- ../..
|
2
roles/nvidia.nvidia_driver/vars/main.yml
Normal file
2
roles/nvidia.nvidia_driver/vars/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
_ubuntu_repo_dir: "{{ ansible_distribution | lower }}{{ ansible_distribution_version | replace('.', '') }}/{{ ansible_architecture }}"
|
||||||
|
_rhel_repo_dir: "rhel{{ ansible_distribution_major_version }}/{{ ansible_architecture }}"
|
42
site.yml
42
site.yml
@ -8,19 +8,18 @@
|
|||||||
apt:
|
apt:
|
||||||
name: debconf-utils
|
name: debconf-utils
|
||||||
state: present
|
state: present
|
||||||
- name: Check if /root/preseed.txt exists
|
|
||||||
stat:
|
|
||||||
path: /root/preseed.txt
|
|
||||||
register: preseed_file
|
|
||||||
- name: Create preseed file
|
- name: Create preseed file
|
||||||
command: echo "#_preseed_V1" > /root/preseed.txt
|
command: echo "#_preseed_V1" > /root/preseed.txt
|
||||||
when: not preseed_file.stat.exists
|
|
||||||
- name: Append installer's debconf database to the preseed file
|
- name: Append installer's debconf database to the preseed file
|
||||||
command: debconf-get-selections --installer >> /root/preseed.txt
|
command: debconf-get-selections --installer >> /root/preseed.txt
|
||||||
when: not preseed_file.stat.exists
|
|
||||||
- name: Append debconf database to the preseed file
|
- name: Append debconf database to the preseed file
|
||||||
command: debconf-get-selections >> /root/preseed.txt
|
command: debconf-get-selections >> /root/preseed.txt
|
||||||
when: not preseed_file.stat.exists
|
- name: Append text from files/motd to the beginning of remote motd file
|
||||||
|
blockinfile:
|
||||||
|
path: /etc/motd
|
||||||
|
marker: ""
|
||||||
|
block: |
|
||||||
|
{{ lookup('file', 'files/motd') }}
|
||||||
- name: Copy nftables configuration template
|
- name: Copy nftables configuration template
|
||||||
template:
|
template:
|
||||||
src: "nftables.conf.j2"
|
src: "nftables.conf.j2"
|
||||||
@ -30,6 +29,15 @@
|
|||||||
name: nftables
|
name: nftables
|
||||||
state: started
|
state: started
|
||||||
enabled: true
|
enabled: true
|
||||||
|
- name: Install prometheus node exporter
|
||||||
|
apt:
|
||||||
|
name: prometheus-node-exporter
|
||||||
|
state: present
|
||||||
|
- name: Enable prometheus node exporter
|
||||||
|
service:
|
||||||
|
name: node_exporter
|
||||||
|
state: started
|
||||||
|
enabld: true
|
||||||
roles:
|
roles:
|
||||||
- role: ericomeehan.ericomeehan
|
- role: ericomeehan.ericomeehan
|
||||||
|
|
||||||
@ -61,11 +69,12 @@
|
|||||||
apt:
|
apt:
|
||||||
name: python3-kubernetes
|
name: python3-kubernetes
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- role: geerlingguy.containerd
|
- role: geerlingguy.containerd
|
||||||
- role: geerlingguy.kubernetes
|
- role: geerlingguy.kubernetes
|
||||||
- role: ericomeehan.nvidia_driver_debian
|
- role: ericomeehan.nvidia_driver_debian
|
||||||
when: nvidia == true
|
when: nvidia_driver_needed == true
|
||||||
tasks:
|
tasks:
|
||||||
- name: Create production namespace
|
- name: Create production namespace
|
||||||
k8s:
|
k8s:
|
||||||
@ -75,7 +84,7 @@
|
|||||||
kind: Namespace
|
kind: Namespace
|
||||||
metadata:
|
metadata:
|
||||||
name: production
|
name: production
|
||||||
when: kubernetes_role == control_plane
|
when: kubernetes_role == "control_plane"
|
||||||
- name: Create testing namespace
|
- name: Create testing namespace
|
||||||
k8s:
|
k8s:
|
||||||
state: present
|
state: present
|
||||||
@ -84,17 +93,4 @@
|
|||||||
kind: Namespace
|
kind: Namespace
|
||||||
metadata:
|
metadata:
|
||||||
name: testing
|
name: testing
|
||||||
when: kubernetes_role == control_plane
|
when: kubernetes_role == "control_plane"
|
||||||
|
|
||||||
- name: Deploy core network services
|
|
||||||
hosts: alpha-control-plane
|
|
||||||
become: true
|
|
||||||
roles:
|
|
||||||
- role: ericomeehan.openldap.eom.dev
|
|
||||||
- role: ericomeehan.openvpn-server.eom.dev
|
|
||||||
- role: ericomeehan.mariadb.eom.dev
|
|
||||||
- role: ericomeehan.influxdb.eom.dev
|
|
||||||
- role: ericomeehan.telegraf.eom.dev
|
|
||||||
- role: ericomeehan.grafana.eom.dev
|
|
||||||
- role: ericomeehan.mediawiki.eom.dev
|
|
||||||
- role: ericomeehan.gitlab.eom.dev
|
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
nodePorts:
|
nodePorts:
|
||||||
#range: 30000-32767
|
gondwanamc-24454: 32454
|
||||||
openldap-port-389: 30389
|
gondwanamc-25565: 32565
|
||||||
openldap-port-636: 30636
|
|
||||||
minecraft-port-24454: 32454
|
|
||||||
minecraft-port-25565: 32565
|
|
||||||
|
1
vars/testing.yml
Normal file
1
vars/testing.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
target_namespace: testing
|
Loading…
Reference in New Issue
Block a user