Created
December 20, 2021 08:53
-
-
Save Utopiah/5bcd3b7a6ccdbf67fc2cf7e8683ef7b7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
package_update: true | |
package_upgrade: true | |
ssh_keys: | |
rsa_private: | | |
-----BEGIN OPENSSH PRIVATE KEY----- | |
ABCD | |
-----END OPENSSH PRIVATE KEY----- | |
rsa_public: ssh-rsa ABCD fabien@cloud-init-hetzner-test | |
users: | |
- name: fabien | |
sudo: ALL=(ALL) NOPASSWD:ALL | |
ssh_authorized_keys: | |
- ssh-rsa ABCD fabien@fabien-CORSAIR-ONE-i160 | |
# some steps, e.g rsync or building images, do take a long while. | |
# a container registry could help. | |
# implies that the key is already authorized on the source, to manually add with ~/.authorized_keys | |
# can be automated by generating a new key then adding it remotely to the source and including in this script | |
rsync -ar -e "ssh -p 22" [email protected]:/home/web /home/ | |
rsync -ar -e "ssh -p 22" [email protected]:/transition / | |
rsync -ar -e "ssh -p 22" [email protected]:/root/Prototypes /root/ | |
apt install screen | |
apt-get install apt-transport-https ca-certificates curl gnupg lsb-release | |
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \ | |
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
apt-get update | |
apt-get install docker-ce docker-ce-cli containerd.io docker-compose | |
cd /transition/peertube | |
docker-compose up -d | |
cd /transition/jitsi | |
docker-compose up -d | |
cd /transition/dockprom | |
docker-compose up -d | |
cd /transition/pmwikis | |
# all following build and tagging could be removed by using an additional build line on docker-compose | |
docker build . -t pmwiki | |
cd /transition/phpfpm-graphviz | |
docker build . -t phpfpm-graphviz | |
cd /transition/debian-for-phantomjs | |
docker build . -t debian-for-phantomjs | |
cd /transition/swarmwebstudy | |
docker build . -t fabien/node-web-app | |
cd /transition/swarmwebstudy_v2 #relatively long due to the actual simulations on top of the compilation | |
docker build . -t fabien/node-web-app-v2 | |
echo "Port 22" >> /etc/ssh/sshd_config | |
service sshd restart | |
docker network create my_network | |
docker network connect my_network caddy | |
docker network connect my_network jitsi_web_1 | |
docker network connect my_network peertube_peertube_1 | |
cd /transition/nginx/ | |
docker-compose up -d | |
#phone_home: | |
# url: https://fabien.benetou.fr/cloud-init/done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment