Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
3526354c05 | |||
13213e4bf7 | |||
43e8eb5911 | |||
b24ef44c4a |
@ -3,6 +3,7 @@ set -eu
|
||||
|
||||
mondomaine=domaine.lan
|
||||
apt-get install -y bind9 bind9-doc bind9-host
|
||||
curl -fsSL https://goss.rocks/install |sh
|
||||
wget -nc https://gitea.lyc-lecastel.fr/gadmin/vagrant/raw/branch/main/divers/bind/mkzone
|
||||
bash mkzone "${mondomaine}"
|
||||
cp db.${mondomaine}* /etc/bind
|
||||
@ -14,7 +15,6 @@ host srv1
|
||||
host srv2
|
||||
host -t soa "${mondomaine}"
|
||||
host -l "${mondomaine}"
|
||||
curl -fsSL https://goss.rocks/install |sh
|
||||
goss add command "host ${mondomaine}"
|
||||
goss add command "host -t soa ${mondomaine}"
|
||||
goss add command "host -t ns ${mondomaine}"
|
||||
|
@ -7,7 +7,7 @@ wget -nc https://gitea.lyc-lecastel.fr/gadmin/vagrant/raw/branch/main/divers/bin
|
||||
bash mkzone -s "${mondomaine}"
|
||||
cp named.conf.local /etc/bind
|
||||
sudo named-checkconf /etc/bind/named.conf
|
||||
sudo named-checkzone "${mondomaine}" "/etc/bind/db.${mondomaine}"
|
||||
sudo named-checkzone "${mondomaine}" "/var/cache/bind/db.${mondomaine}"
|
||||
sudo systemctl restart bind9
|
||||
host srv1
|
||||
host srv2
|
||||
|
32
docker-app/docker-compose.yml
Normal file
32
docker-app/docker-compose.yml
Normal file
@ -0,0 +1,32 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
php:
|
||||
container_name: php
|
||||
# image: php:apache
|
||||
build: './php'
|
||||
restart: always
|
||||
ports:
|
||||
- "8000:80"
|
||||
volumes:
|
||||
- ./code:/var/www/html
|
||||
depends_on:
|
||||
- db
|
||||
env_file:
|
||||
- .env
|
||||
db:
|
||||
container_name: db
|
||||
image: mariadb
|
||||
restart: always
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PASSWORD
|
||||
MYSQL_DATABASE: ${MYSQL_DATABASE}
|
||||
MYSQL_USER: ${MYSQL_USER}
|
||||
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
||||
volumes:
|
||||
- ./db:/var/lib/mysql
|
||||
- ./db-init:/docker-entrypoint-initdb.d
|
||||
env_file:
|
||||
- .env
|
||||
|
||||
|
72
k3s-awx/Vagrantfile
vendored
Normal file
72
k3s-awx/Vagrantfile
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
# All Vagrant configuration is done below. The "2" in Vagrant.configure
|
||||
# configures the configuration version (we support older styles for
|
||||
# backwards compatibility). Please don't change it unless you know what
|
||||
# you're doing.
|
||||
Vagrant.configure("2") do |config|
|
||||
# The most common configuration options are documented and commented below.
|
||||
# For a complete reference, please see the online documentation at
|
||||
# https://docs.vagrantup.com.
|
||||
|
||||
# Every Vagrant development environment requires a box. You can search for
|
||||
# boxes at https://vagrantcloud.com/search.
|
||||
config.vm.box = "debian/bullseye64"
|
||||
config.vm.hostname = "k3s-awx"
|
||||
|
||||
# Disable automatic box update checking. If you disable this, then
|
||||
# boxes will only be checked for updates when the user runs
|
||||
# `vagrant box outdated`. This is not recommended.
|
||||
# config.vm.box_check_update = false
|
||||
|
||||
# Create a forwarded port mapping which allows access to a specific port
|
||||
# within the machine from a port on the host machine. In the example below,
|
||||
# accessing "localhost:8080" will access port 80 on the guest machine.
|
||||
# NOTE: This will enable public access to the opened port
|
||||
# config.vm.network "forwarded_port", guest: 80, host: 8080
|
||||
|
||||
# Create a forwarded port mapping which allows access to a specific port
|
||||
# within the machine from a port on the host machine and only allow access
|
||||
# via 127.0.0.1 to disable public access
|
||||
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
|
||||
|
||||
# Create a private network, which allows host-only access to the machine
|
||||
# using a specific IP.
|
||||
config.vm.network "private_network", ip: "192.168.56.10"
|
||||
|
||||
# Create a public network, which generally matched to bridged network.
|
||||
# Bridged networks make the machine appear as another physical device on
|
||||
# your network.
|
||||
# config.vm.network "public_network"
|
||||
|
||||
# Share an additional folder to the guest VM. The first argument is
|
||||
# the path on the host to the actual folder. The second argument is
|
||||
# the path on the guest to mount the folder. And the optional third
|
||||
# argument is a set of non-required options.
|
||||
# config.vm.synced_folder "../data", "/vagrant_data"
|
||||
|
||||
# Provider-specific configuration so you can fine-tune various
|
||||
# backing providers for Vagrant. These expose provider-specific options.
|
||||
# Example for VirtualBox:
|
||||
#
|
||||
config.vm.provider "virtualbox" do |vb|
|
||||
# # Display the VirtualBox GUI when booting the machine
|
||||
# vb.gui = true
|
||||
#
|
||||
# # Customize the amount of memory on the VM:
|
||||
vb.memory = "3072"
|
||||
end
|
||||
#
|
||||
# View the documentation for the provider you are using for more
|
||||
# information on available options.
|
||||
|
||||
# Enable provisioning with a shell script. Additional provisioners such as
|
||||
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
|
||||
# documentation for more information about their specific syntax and use.
|
||||
config.vm.provision "shell", inline: <<-SHELL
|
||||
apt-get update
|
||||
apt-get install -y curl vim git make
|
||||
SHELL
|
||||
end
|
||||
|
36
k3s-awx/inst-awx
Normal file
36
k3s-awx/inst-awx
Normal file
@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
# installation awx sur k3s
|
||||
export NAMESPACE=awx
|
||||
AWX_HOST="awx.sio.lan"
|
||||
REL="2.0.1"
|
||||
[ -x /usr/local/bin/k3s-uninstall.sh ] && /usr/local/bin/k3s-uninstall.sh
|
||||
sudo rm -rf /data
|
||||
sudo rm -rf awx*
|
||||
export NAMESPACE=awx
|
||||
#export http_proxy=http://10.121.38.1:8080
|
||||
#export https_proxy=http://10.121.38.1:8080
|
||||
|
||||
curl -sfL https://get.k3s.io | sh -s - --write-kubeconfig-mode 644
|
||||
cd ~
|
||||
git clone https://github.com/ansible/awx-operator.git
|
||||
cd awx-operator
|
||||
git checkout "${REL}"
|
||||
export NAMESPACE=awx
|
||||
make deploy
|
||||
kubectl -n awx get all
|
||||
|
||||
cd ~
|
||||
git clone https://github.com/kurokobo/awx-on-k3s.git
|
||||
cd awx-on-k3s
|
||||
git checkout "${REL}"
|
||||
#AWX_HOST="awx.sio.lan"
|
||||
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -out ./base/tls.crt -keyout ./base/tls.key -subj "/CN=${AWX_HOST}/O=${AWX_HOST}" -addext "subjectAltName = DNS:${AWX_HOST}"
|
||||
sed -i "s/awx.example.com/${AWX_HOST}/" base/awx.yaml
|
||||
sudo mkdir -p /data/postgres-13
|
||||
sudo mkdir -p /data/projects
|
||||
sudo chmod 755 /data/postgres-13
|
||||
sudo chown 1000:0 /data/projects
|
||||
kubectl apply -k base
|
||||
kubectl -n awx logs -f deployments/awx-operator-controller-manager
|
||||
kubectl -n awx get awx,all,ingress,secrets
|
||||
|
Reference in New Issue
Block a user