feat: Mise à jour
This commit is contained in:
1 parent
6ebedbeca3
commit
91045fa232
19 files changed
+337
-27
No files matched your search
@@ -0,0 +1,110 @@
|
||||
name: app-pydio
|
||||
description: Install pydio cells
|
||||
config:
|
||||
cloud-init.vendor-data: |
|
||||
#cloud-config
|
||||
|
||||
timezone: Europe/Paris
|
||||
locale: fr_FR.UTF-8
|
||||
|
||||
# Packages
|
||||
package_update: true
|
||||
package_upgrade: true
|
||||
packages:
|
||||
- tar
|
||||
- unzip
|
||||
- wget
|
||||
- git
|
||||
|
||||
# Users
|
||||
users:
|
||||
- default
|
||||
- name: pydio
|
||||
groups: sudo
|
||||
shell: /bin/bash
|
||||
sudo: ['ALL=(ALL) NOPASSWD:ALL']
|
||||
|
||||
write_files:
|
||||
- path: "/etc/systemd/system/pydio.service"
|
||||
owner: root:root
|
||||
permissions: "0644"
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Pydio Cells
|
||||
Documentation=https://pydio.com
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
AssertFileIsExecutable=/opt/pydio/bin/cells
|
||||
|
||||
[Service]
|
||||
User=pydio
|
||||
Group=pydio
|
||||
WorkingDirectory=/home/pydio
|
||||
PermissionsStartOnly=true
|
||||
|
||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
ExecStart=/opt/pydio/bin/cells start
|
||||
Restart=on-failure
|
||||
StandardOutput=journal
|
||||
StandardError=inherit
|
||||
LimitNOFILE=65536
|
||||
TimeoutStopSec=5
|
||||
KillSignal=INT
|
||||
SendSIGKILL=yes
|
||||
SuccessExitStatus=0
|
||||
|
||||
# Add environment variables
|
||||
Environment=CELLS_WORKING_DIR=/var/pydio/cells
|
||||
Environment=CELLS_ENABLE_METRICS=false
|
||||
Environment=CELLS_SITE_NO_TLS=1
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
- path: "/tmp/pydio-install.yaml"
|
||||
content: |
|
||||
# This is the minimal configuration to directly start a pre-configured server in sandbox mode
|
||||
# Adapt to your convenience and report to the documentation to explore further possibilities.
|
||||
# Environment variables are defined in .env file and injected at run time.
|
||||
proxyconfigs:
|
||||
- binds:
|
||||
- 0.0.0.0:8080
|
||||
reverseproxyurl: http://pydio.front.lxd:8080
|
||||
|
||||
# WebUI Admin definition
|
||||
frontendlogin: admin
|
||||
frontendpassword: TOBECHANGED
|
||||
|
||||
# DB connection
|
||||
dbconnectiontype: tcp
|
||||
dbtcphostname: 10.112.17.20
|
||||
dbtcpport: 3306
|
||||
dbtcpname: cells
|
||||
dbtcpuser: pydio
|
||||
dbtcppassword: TOBECHANGED
|
||||
|
||||
runcmd:
|
||||
# Wait for network to be ready
|
||||
- [ sleep, '5' ]
|
||||
# Install pydio cells binary
|
||||
- [ mkdir, '--parents' , '/opt/pydio/bin' , '/var/pydio/cells' ]
|
||||
- >
|
||||
wget 'https://download.pydio.com/latest/cells/release/%7Blatest%7D/linux-amd64/pydio-cells-%7Blatest%7D-linux-amd64.zip' -O /tmp/pydio-cells.zip
|
||||
&& unzip -d /opt/pydio/bin /tmp/pydio-cells.zip cells
|
||||
&& rm /tmp/pydio-cells.zip
|
||||
- [ chmod, '+x', '/opt/pydio/bin/cells' ]
|
||||
# Copy pydio install file
|
||||
- [ cp, /tmp/pydio-install.yaml, /home/pydio/install.yaml ]
|
||||
- [ chown, '--recursive', 'pydio:pydio', '/home/pydio', '/opt/pydio' , '/var/pydio/cells' ]
|
||||
# Initial setup
|
||||
- sudo -u pydio -i -- bash -c "CELLS_INSTALL_YAML=/home/pydio/install.yaml CELLS_WORKING_DIR=/var/pydio/cells /opt/pydio/bin/cells configure"
|
||||
# Enable and start the service
|
||||
- [ systemctl, daemon-reload ]
|
||||
- [ systemctl, enable, --now, pydio.service ]
|
||||
|
||||
devices:
|
||||
data:
|
||||
type: disk
|
||||
pool: zfs
|
||||
source: pydio-data
|
||||
path: /var/pydio/cells
|
||||
@@ -13,30 +13,14 @@ config:
|
||||
packages:
|
||||
- unzip
|
||||
|
||||
# Users
|
||||
users:
|
||||
- default
|
||||
- name: gitea
|
||||
groups: sudo
|
||||
shell: /bin/bash
|
||||
sudo: ['ALL=(ALL) NOPASSWD:ALL']
|
||||
|
||||
# Configure second network interface
|
||||
write_files:
|
||||
- path: "/etc/netplan/eth1.yaml"
|
||||
permissions: "0755"
|
||||
content: |
|
||||
network:
|
||||
version: 2
|
||||
ethernets:
|
||||
eth1:
|
||||
dhcp4: true
|
||||
# users:
|
||||
# - default
|
||||
# - name: gitea
|
||||
# groups: sudo
|
||||
# shell: /bin/bash
|
||||
# sudo: ['ALL=(ALL) NOPASSWD:ALL']
|
||||
|
||||
runcmd:
|
||||
# Apply network config
|
||||
- [ netplan, generate ]
|
||||
- [ netplan, apply ]
|
||||
|
||||
# Install gitea
|
||||
- [ snap, install, gitea ]
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
name: mariadb
|
||||
description: Install mariadb
|
||||
config:
|
||||
cloud-init.vendor-data: |
|
||||
#cloud-config
|
||||
package_update: true
|
||||
package_upgrade: true
|
||||
packages:
|
||||
- mariadb-server
|
||||
timezone: Europe/Paris
|
||||
locale: fr_FR.UTF-8
|
||||
runcmd:
|
||||
# Bind on all interfaces
|
||||
- sed -i -e 's,\(bind-address.*\)127.0.0.1,\10.0.0.0,g' /etc/mysql/mariadb.conf.d/50-server.cnf
|
||||
devices:
|
||||
data:
|
||||
type: disk
|
||||
pool: zfs
|
||||
source: mariadb-data
|
||||
path: /var/lib/mysql
|
||||
@@ -0,0 +1,8 @@
|
||||
name: traefik-config
|
||||
description: "Volume to mount traefik config dir from host"
|
||||
devices:
|
||||
config:
|
||||
type: disk
|
||||
source: /home/ubuntu/infra/new/traefik/config
|
||||
path: /etc/traefik
|
||||
shift: "true"
|
||||
@@ -0,0 +1,8 @@
|
||||
name: docker-volume-data
|
||||
description: "A profile that add a volume for docker data"
|
||||
devices:
|
||||
docker-data:
|
||||
type: disk
|
||||
pool: btrfs
|
||||
source: docker-data
|
||||
path: /var/lib/docker
|
||||
@@ -0,0 +1,8 @@
|
||||
name: docker-volume-manifests
|
||||
description: "A profile that mount a manifests directory from the host"
|
||||
devices:
|
||||
manifests:
|
||||
path: /home/ubuntu/manifests
|
||||
shift: "true"
|
||||
source: /home/ubuntu/infra/new/docker/manifests
|
||||
type: disk
|
||||
@@ -0,0 +1,25 @@
|
||||
name: docker
|
||||
description: "A profile that deploy docker in an LXD container"
|
||||
config:
|
||||
linux.kernel_modules: overlay
|
||||
raw.lxc: |-
|
||||
lxc.apparmor.profile = unconfined
|
||||
lxc.cgroup.devices.allow = a
|
||||
lxc.mount.auto=proc:rw sys:rw
|
||||
lxc.cap.drop =
|
||||
security.nesting: "true"
|
||||
security.privileged: "true"
|
||||
cloud-init.vendor-data: |
|
||||
#cloud-config
|
||||
package_update: true
|
||||
package_upgrade: true
|
||||
packages:
|
||||
- curl
|
||||
runcmd:
|
||||
- curl https://get.docker.com | sh
|
||||
# Provision two network bridges
|
||||
- sleep 30
|
||||
- docker network create --driver bridge --subnet=172.25.0.0/24 front
|
||||
- docker network create --driver bridge --subnet=172.30.0.0/24 back
|
||||
timezone: Europe/Paris
|
||||
locale: fr_FR.UTF-8
|
||||
@@ -0,0 +1,40 @@
|
||||
name: microk8s
|
||||
description: "A profile that deploy microk8s in an LXD container"
|
||||
devices:
|
||||
aadisable:
|
||||
path: /sys/module/nf_conntrack/parameters/hashsize
|
||||
source: /sys/module/nf_conntrack/parameters/hashsize
|
||||
type: disk
|
||||
aadisable2:
|
||||
path: /dev/zfs
|
||||
source: /dev/zfs
|
||||
type: disk
|
||||
aadisable3:
|
||||
path: /dev/kmsg
|
||||
source: /dev/kmsg
|
||||
type: unix-char
|
||||
aadisable4:
|
||||
path: /sys/fs/bpf
|
||||
source: /sys/fs/bpf
|
||||
type: disk
|
||||
aadisable5:
|
||||
path: /proc/sys/net/netfilter/nf_conntrack_max
|
||||
source: /proc/sys/net/netfilter/nf_conntrack_max
|
||||
type: disk
|
||||
config:
|
||||
linux.kernel_modules: ip_vs,ip_vs_rr,ip_vs_wrr,ip_vs_sh,ip_tables,ip6_tables,netlink_diag,nf_nat,overlay,br_netfilter
|
||||
raw.lxc: |
|
||||
lxc.apparmor.profile=unconfined
|
||||
lxc.mount.auto=proc:rw sys:rw cgroup:rw
|
||||
lxc.cgroup.devices.allow=a
|
||||
lxc.cap.drop=
|
||||
security.nesting: "true"
|
||||
security.privileged: "true"
|
||||
cloud-init.vendor-data: |
|
||||
#cloud-config
|
||||
package_update: true
|
||||
package_upgrade: true
|
||||
runcmd:
|
||||
- [ 'snap', 'install', 'microk8s', '--classic' ]
|
||||
timezone: Europe/Paris
|
||||
locale: fr_FR.UTF-8
|
||||
@@ -0,0 +1,5 @@
|
||||
name: size-large
|
||||
description: "Large sized instance limits"
|
||||
limits:
|
||||
cpu: 4
|
||||
memory: 8GB
|
||||
@@ -0,0 +1,5 @@
|
||||
name: size-medium
|
||||
description: "Medium sized instance limits"
|
||||
limits:
|
||||
cpu: 2
|
||||
memory: 4GB
|
||||
@@ -0,0 +1,7 @@
|
||||
name: proxy-docker
|
||||
description: Expose private docker sock via tcp on the host
|
||||
devices:
|
||||
dockersock:
|
||||
type: proxy
|
||||
listen: tcp:0.0.0.0:2375
|
||||
connect: unix:/run/docker.sock
|
||||
@@ -0,0 +1,7 @@
|
||||
name: proxy-taskwarrior
|
||||
description: Proxify taskwarrior server tcp traffic to the instance
|
||||
devices:
|
||||
hostport53589:
|
||||
type: proxy
|
||||
listen: tcp:0.0.0.0:53589
|
||||
connect: tcp:127.0.0.1:53589
|
||||
@@ -1,11 +1,8 @@
|
||||
config: {}
|
||||
description: ""
|
||||
name: certificates
|
||||
description: "Volume to mount letsencrypt certificates from host"
|
||||
devices:
|
||||
certificates:
|
||||
path: /certificates
|
||||
shift: "true"
|
||||
source: /etc/letsencrypt/live
|
||||
type: disk
|
||||
name: certificates
|
||||
used_by:
|
||||
- /1.0/instances/docker?project=docker
|
||||
Reference in new issue
Block a user