Wire up project repo.
This commit is contained in:
parent
0510a36522
commit
2f16d2de0a
2
deployment/.gitignore
vendored
Normal file
2
deployment/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# this is tracked in a distinct git repo.
|
||||||
|
project
|
15
install.sh
15
install.sh
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -eu
|
set -exu
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
# see https://www.sovereign-stack.org/management/
|
# see https://www.sovereign-stack.org/management/
|
||||||
@ -137,3 +137,16 @@ lxc restart ss-mgmt
|
|||||||
if [ "$ADDED_COMMAND" = true ]; then
|
if [ "$ADDED_COMMAND" = true ]; then
|
||||||
echo "NOTICE! You need to run 'source ~/.bashrc' before continuing. After that, type 'ss-manage' to enter your management environment."
|
echo "NOTICE! You need to run 'source ~/.bashrc' before continuing. After that, type 'ss-manage' to enter your management environment."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# deploy clams wallet.
|
||||||
|
PROJECTS_SCRIPTS_REPO_URL="https://git.sovereign-stack.org/ss/project"
|
||||||
|
PROJECTS_SCRIPTS_PATH="$(pwd)/deployment/project"
|
||||||
|
if [ ! -d "$PROJECTS_SCRIPTS_PATH" ]; then
|
||||||
|
git clone "$PROJECTS_SCRIPTS_REPO_URL" "$PROJECTS_SCRIPTS_PATH"
|
||||||
|
else
|
||||||
|
cd "$PROJECTS_SCRIPTS_PATH"
|
||||||
|
git config --global pull.rebase false
|
||||||
|
git pull
|
||||||
|
cd -
|
||||||
|
fi
|
||||||
|
@ -41,20 +41,22 @@ if ! snap list | grep -q lxd; then
|
|||||||
sudo lxd init --auto
|
sudo lxd init --auto
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Your management machine has been provisioned!"
|
|
||||||
|
|
||||||
# run a lxd command so we don't we a warning upon first invocation
|
# run a lxd command so we don't we a warning upon first invocation
|
||||||
lxc list > /dev/null 2>&1
|
lxc list > /dev/null 2>&1
|
||||||
|
|
||||||
|
|
||||||
# add groups for docker and lxd
|
# add groups for docker and lxd
|
||||||
|
if ! groups ubuntu | grep -q docker; then
|
||||||
sudo addgroup docker
|
sudo addgroup docker
|
||||||
|
|
||||||
sudo usermod -aG docker ubuntu
|
sudo usermod -aG docker ubuntu
|
||||||
sudo usermod -aG lxd ubuntu
|
sudo usermod -aG lxd ubuntu
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# if an SSH pubkey does not exist, we create one.
|
# if an SSH pubkey does not exist, we create one.
|
||||||
if [ ! -f /home/ubuntu/.ssh/id_rsa.pub ]; then
|
if [ ! -f /home/ubuntu/.ssh/id_rsa.pub ]; then
|
||||||
# generate a new SSH key for the base vm image.
|
# generate a new SSH key for the base vm image.
|
||||||
ssh-keygen -f /home/ubuntu/.ssh/id_rsa -t ecdsa -b 521 -N ""
|
ssh-keygen -f /home/ubuntu/.ssh/id_rsa -t ecdsa -b 521 -N ""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Your management machine has been provisioned!"
|
Loading…
Reference in New Issue
Block a user