Compare commits
20 Commits
v0.0.6n-jl
...
v0.0.6y-aa
Author | SHA1 | Date | |
---|---|---|---|
3e98f7149f | |||
d29c428c46 | |||
c446f35aed | |||
41bd6ac61e | |||
7ce68f6293 | |||
bac2f067a9 | |||
d6d4991c16 | |||
2f7544c3a1 | |||
c83ba7c977 | |||
1532c8bdd0 | |||
08c73d0416 | |||
083b112d03 | |||
252618618b | |||
34f3adb117 | |||
3565d85543 | |||
de757a6b55 | |||
e38f8c6da5 | |||
40eadcc37a | |||
68c05b0794 | |||
b36505bf78 |
@ -53,7 +53,7 @@ On utilsera le script (bash) **mkvm** ou (PowerShell) **mkvm.ps1** pour créeer
|
||||
|
||||
```shell
|
||||
gsb2023>
|
||||
cd pre
|
||||
cd scripts
|
||||
$ mkvm -r s-adm
|
||||
|
||||
```
|
||||
|
13
r-vp1-fw.yml
Normal file
13
r-vp1-fw.yml
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
connection: local
|
||||
|
||||
vars:
|
||||
- ip1: 192.168.0.51
|
||||
- remip: 192.168.0.52
|
||||
- mynet: 192.168.1.0
|
||||
- remnet: 172.16.128.0
|
||||
|
||||
roles:
|
||||
- fw-ferm
|
||||
|
@ -12,10 +12,8 @@
|
||||
- base
|
||||
- goss
|
||||
# - snmp-agent
|
||||
# - firewall-vpn-r
|
||||
- post
|
||||
- wireguard-r
|
||||
- fw-ferm
|
||||
- ssh-cli
|
||||
- syslog-cli
|
||||
|
||||
|
12
r-vp2-fw.yml
Normal file
12
r-vp2-fw.yml
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
connection: local
|
||||
|
||||
vars:
|
||||
- ip1: 192.168.0.52
|
||||
- remip: 192.168.0.51
|
||||
- mynet: 172.16.128.0
|
||||
- remnet: 192.168.1.0
|
||||
|
||||
roles:
|
||||
- fw-ferm
|
@ -15,10 +15,7 @@
|
||||
- dns-agence
|
||||
- ssh-root-access
|
||||
# - snmp-agent
|
||||
# - firewall-vpn-l
|
||||
- wireguard-l
|
||||
# - x509-l
|
||||
- post
|
||||
- ssh-cli
|
||||
- syslog-cli
|
||||
- fw-ferm
|
||||
|
@ -1,23 +0,0 @@
|
||||
// 0.2 - putconf - vendredi 12 avril 2013, 08:54:33 (UTC+0200)
|
||||
|
||||
options {
|
||||
directory "/var/cache/bind";
|
||||
|
||||
// If there is a firewall between you and nameservers you want
|
||||
// to talk to, you may need to fix the firewall to allow multiple
|
||||
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
|
||||
|
||||
// If your ISP provided one or more IP addresses for stable
|
||||
// nameservers, you probably want to use them as forwarders.
|
||||
// Uncomment the following block, and insert the addresses replacing
|
||||
// the all-0's placeholder.
|
||||
|
||||
forwarders {
|
||||
172.16.0.1;
|
||||
|
||||
};
|
||||
|
||||
auth-nxdomain no; # conform to RFC1035
|
||||
listen-on-v6 { any; };
|
||||
};
|
||||
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
- name: restart bind9
|
||||
service: name=bind9 state=restarted
|
||||
|
@ -1,11 +0,0 @@
|
||||
---
|
||||
|
||||
- name: Installation bind9
|
||||
apt: name=bind9 state=present update_cache=yes
|
||||
|
||||
- name: Copie named.conf.options
|
||||
copy: src=named.conf.options dest=/etc/bind
|
||||
notify:
|
||||
- restart bind9
|
||||
|
||||
|
@ -35,23 +35,22 @@ table filter {
|
||||
proto (udp tcp) dport domain ACCEPT;
|
||||
proto udp dport bootps ACCEPT;
|
||||
}
|
||||
|
||||
# interface réseau
|
||||
interface $DEV_WORLD {
|
||||
|
||||
}
|
||||
|
||||
# the rest is dropped by the above policy
|
||||
}#FIN INPUT
|
||||
|
||||
# outgoing connections are not limited
|
||||
chain OUTPUT {policy ACCEPT;
|
||||
chain OUTPUT {
|
||||
policy ACCEPT;
|
||||
# interface $DEV_VPN proto ssh dport 22 ACCEPT;
|
||||
|
||||
}#FIN OUTPUT
|
||||
|
||||
chain FORWARD {
|
||||
policy ACCEPT;
|
||||
|
||||
proto icmp icmp-type echo-request ACCEPT;
|
||||
}
|
||||
# connection tracking
|
||||
mod state state INVALID DROP;
|
||||
mod state state (ESTABLISHED RELATED) ACCEPT;
|
||||
|
0
roles/peertube-k3s/README.md
Normal file
0
roles/peertube-k3s/README.md
Normal file
23
roles/peertube-k3s/tasks/main.yml
Normal file
23
roles/peertube-k3s/tasks/main.yml
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
- name: mise a jour de resolv.conf...
|
||||
copy:
|
||||
src: /root/tools/ansible/gsb2023/roles/peertube/files/resolv.conf
|
||||
dest: /etc/
|
||||
mode: '0644'
|
||||
|
||||
- name: installation de docker...
|
||||
shell: curl https://releases.rancher.com/install-docker/20.10.sh | sh
|
||||
|
||||
- name: attente de l'installation...
|
||||
wait_for:
|
||||
timeout: 30
|
||||
host: localhost
|
||||
|
||||
- name: installation de k3s...
|
||||
shell: curl -sfL https://get.k3s.io | sh -s - --docker
|
||||
|
||||
- name: mise a jour de resolv.conf...
|
||||
copy:
|
||||
src: /root/tools/ansible/gsb2023/roles/peertube/files/resolv.conf
|
||||
dest: /etc/
|
||||
mode: '0644'
|
1
roles/peertube/files/resolv.conf
Normal file
1
roles/peertube/files/resolv.conf
Normal file
@ -0,0 +1 @@
|
||||
nameserver 192.168.99.99
|
@ -44,7 +44,7 @@ peertube:
|
||||
dbUser: user # must be consistent with postgresql configuration
|
||||
dbPasswd: user # must be consistent with postgresql configuration
|
||||
dbSsl: false # disabled by default WARNING: ssl connection feature not tested, use at your own risk
|
||||
dbHostname: peertube-postgresql # must be consistent with postgresql configuration
|
||||
dbHostname: peertube-gsb-postgresql # must be consistent with postgresql configuration
|
||||
webHostname: peertube # must be changed to your local setup
|
||||
secret: b2753b0f37444974de0e81f04815e6a889fcf8960bd203a01b624d8fa8a37683
|
||||
smtpHostname: peertube-mail # must be consistent with mail configuration
|
||||
@ -53,7 +53,7 @@ peertube:
|
||||
smtpTls: false # disabled by default WARNING: tls connection feature not tested, use at your own risk
|
||||
smtpDisableStartTls: false # unless crashes related to tls/ssl, this should be unchanged
|
||||
adminEmail: root@localhost.lan # use this if you want peopleto be able to reach you
|
||||
redisHostname: peertube-redis-master # must be consistent with redis configuration
|
||||
redisHostname: peertube-gsb-redis-master # must be consistent with redis configuration
|
||||
redisAuth: peertube # must be consistent with redis configuration
|
||||
app:
|
||||
userCanRegister: true # control if people can register by themselves
|
||||
@ -71,7 +71,7 @@ mail:
|
||||
enbled: true
|
||||
config:
|
||||
general:
|
||||
ALLOWED_SENDER_DOMAINS: # should be the same as your web domain
|
||||
ALLOWED_SENDER_DOMAINS: "yes"
|
||||
DKIM_AUTOGENERATE: "yes"
|
||||
opendkim:
|
||||
RequireSafeKeys: "no"
|
||||
@ -116,7 +116,7 @@ ingress:
|
||||
|
||||
resources: {}
|
||||
autoscaling:
|
||||
enabled: true
|
||||
enabled: false
|
||||
minimumReplicas: 3
|
||||
maximumReplicas: 20
|
||||
targetCPUUtilizationPercentage: 90
|
||||
|
@ -1,10 +1,4 @@
|
||||
---
|
||||
- name: installation de docker...
|
||||
shell: curl https://releases.rancher.com/install-docker/20.10.sh | sh
|
||||
|
||||
- name: installation de k3s...
|
||||
shell: curl -sfL https://get.k3s.io | sh -s - --docker
|
||||
|
||||
- name: création du répertoire du dépot peertube...
|
||||
file:
|
||||
path: /root/tools/peertube
|
||||
@ -16,6 +10,7 @@
|
||||
repo: https://github.com/Elam-Monnot/Peertube-helm.git
|
||||
dest: /root/tools/peertube
|
||||
clone: yes
|
||||
force: yes
|
||||
|
||||
- name: copie de values.yaml...
|
||||
copy:
|
||||
@ -26,5 +21,11 @@
|
||||
- name: installation de helm...
|
||||
shell: curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
|
||||
|
||||
- name: exposition du cluster...
|
||||
shell: export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
|
||||
|
||||
- name: installation de peertube...
|
||||
shell: helm dependency build /root/tools/peertube/helm/ && helm install --create-namesapce -n peertube peertube-gsb /root/tools/peertube/helm
|
||||
shell: helm repo add postgresql https://charts.bitnami.com/bitnami && helm repo add redis https://charts.bitnami.com/bitnami && helm repo add mail https://bokysan.github.io/docker-postfix
|
||||
|
||||
- name: lancement du helm chart peertube...
|
||||
shell: helm install --create-namespace -n peertube peertube-gsb /root/tools/peertube/helm
|
||||
|
@ -1,26 +0,0 @@
|
||||
# This file describes the network interfaces available on your system
|
||||
# and how to activate them. For more information, see interfaces(5).
|
||||
|
||||
# The loopback network interface
|
||||
#auto lo
|
||||
#iface lo inet loopback
|
||||
|
||||
#cote N-adm
|
||||
allow-hotplug enp0s3
|
||||
iface enp0s3 inet dhcp
|
||||
|
||||
# reseau entre vpn
|
||||
allow-hotplug enp0s8
|
||||
iface enp0s8 inet static
|
||||
address 192.168.0.51
|
||||
netmask 255.255.255.0
|
||||
|
||||
# reseau interne n-linkv
|
||||
allow-hotplug enp0s9
|
||||
iface enp0s9 inet static
|
||||
address 192.168.1.2
|
||||
netmask 255.255.255.0
|
||||
up route add -net 172.16.128.0/24 gw 192.168.1.2
|
||||
up route add default gw 192.168.1.1
|
||||
# post-up /bin/bash /root/iptables-vpn
|
||||
post-up /etc/init.d/ipsec restart
|
@ -1,25 +0,0 @@
|
||||
# This file describes the network interfaces available on your system
|
||||
# and how to activate them. For more information, see interfaces(5).
|
||||
|
||||
# The loopback network interface
|
||||
#auto lo
|
||||
#iface lo inet loopback
|
||||
|
||||
# cote N-adm
|
||||
allow-hotplug enp0s3
|
||||
iface enp0s3 inet dhcp
|
||||
|
||||
# cote Agence
|
||||
allow-hotplug enp0s8
|
||||
iface enp0s8 inet static
|
||||
address 172.16.128.254
|
||||
netmask 255.255.255.0
|
||||
|
||||
# cote VPN
|
||||
allow-hotplug enp0s9
|
||||
iface enp0s9 inet static
|
||||
address 192.168.0.52
|
||||
netmask 255.255.255.0
|
||||
up route add -net 192.168.1.0/24 gw 172.16.128.254
|
||||
# post-up /bin/bash /root/iptables-vpn
|
||||
post-up /etc/init.d/ipsec restart
|
@ -14,4 +14,4 @@ iface enp0s3 inet static
|
||||
allow-hotplug enp0s8
|
||||
iface enp0s8 inet static
|
||||
address 192.168.100.20/24
|
||||
post-up systemctl start k3s
|
||||
post-up systemctl start k3s && sleep 20 && export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
|
||||
|
@ -4,7 +4,8 @@
|
||||
|
||||
roles:
|
||||
- base
|
||||
- peertube
|
||||
- post
|
||||
- snmp-agent
|
||||
- ssh-cli
|
||||
- peertube-k3s
|
||||
- peertube
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#recuperation du fichier de config
|
||||
wget http://r-vp1.gsb.adm:8800/wg0-b.conf
|
||||
wget http://r-vp1.gsb.adm:8000/wg0-b.conf
|
||||
#renomage fichier et mv
|
||||
mv ./wg0-b.conf /etc/wireguard/wg0.conf
|
||||
#activation interface wg0
|
||||
|
Reference in New Issue
Block a user