Cleans up
This commit is contained in:
parent
71d6ec77cf
commit
869aaf24ae
2 changed files with 0 additions and 54 deletions
|
@ -1,34 +0,0 @@
|
|||
#!/bin/sh
|
||||
if [ $# -ge 2 ]; then
|
||||
SERVER=$1
|
||||
BACKUP_DEST=$2
|
||||
else
|
||||
echo "Usage: sh ./deploy/deploy.sh server backup_dest [branch [user]]]"
|
||||
exit 1
|
||||
fi
|
||||
if [ $# -ge 3 ]; then
|
||||
BRANCH=$3
|
||||
else
|
||||
BRANCH="master"
|
||||
fi
|
||||
if [ $# -ge 4 ]; then
|
||||
USER=$4
|
||||
else
|
||||
USER="core"
|
||||
fi
|
||||
|
||||
echo "Server to deploy is $SERVER"
|
||||
echo "Backups will live under $BACKUP_DEST"
|
||||
echo "IndieHosters repo branch is $BRANCH"
|
||||
echo "Remote user is $USER"
|
||||
|
||||
scp ./deploy/onServer.sh $USER@$SERVER:
|
||||
|
||||
ssh $USER@$SERVER sudo mkdir -p /var/lib/coreos-install/
|
||||
scp cloud-config $USER@$SERVER:/var/lib/coreos-install/user_data
|
||||
ssh $USER@$SERVER sudo sh ./onServer.sh $BRANCH $SERVER
|
||||
|
||||
# overrides BACKUP_DESTINATION from cloud-config
|
||||
echo $BACKUP_DEST > ./deploy/tmp.txt
|
||||
scp ./deploy/tmp.txt $USER@$SERVER:/data/BACKUP_DESTINATION
|
||||
rm ./deploy/tmp.txt
|
|
@ -1,20 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
#Usage from deploy/deploy.sh:
|
||||
#ssh $USER@$SERVER sudo sh ./onServer.sh $BRANCH $SERVER
|
||||
|
||||
echo Starting etcd:
|
||||
/usr/bin/coreos-cloudinit --from-file=/var/lib/coreos-install/user_data
|
||||
|
||||
echo Cloning the indiehosters repo into /data/indiehosters:
|
||||
mkdir -p /data
|
||||
cd /data
|
||||
git clone https://github.com/indiehosters/indiehosters.git
|
||||
cd indiehosters
|
||||
|
||||
echo Checking out $1 branch of the IndieHosters indiehosters:
|
||||
git checkout $1
|
||||
git pull
|
||||
|
||||
echo Running the server setup script:
|
||||
sh scripts/setup.sh $2
|
Loading…
Reference in a new issue