mirror of
https://github.com/moparisthebest/mailiverse
synced 2025-02-17 14:20:10 -05:00
starting to get the install done
This commit is contained in:
parent
a65b16c81b
commit
f636de0f14
@ -1,6 +1,7 @@
|
|||||||
if [ -z "$1" ]; then echo "Must supply name"; exit 0; fi
|
if [ -z "$1" ]; then echo "Must supply name"; exit 0; fi
|
||||||
|
|
||||||
server="red"
|
source ../config.hosts
|
||||||
|
server=$M_HOST_DEV
|
||||||
|
|
||||||
echo stopping...
|
echo stopping...
|
||||||
ssh $1@$server "cd deploy && ./shutdown"
|
ssh $1@$server "cd deploy && ./shutdown"
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
server="red"
|
source ../config.hosts
|
||||||
|
server=$M_HOST_DEV
|
||||||
|
|
||||||
echo restarting...
|
echo restarting...
|
||||||
ssh tomcat@$server "cd deploy && ./restart"
|
ssh tomcat@$server "cd deploy && ./restart"
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
if [ -z "$1" ]; then echo "Must supply name"; exit 0; fi
|
if [ -z "$1" ]; then echo "Must supply name"; exit 0; fi
|
||||||
|
|
||||||
server="red"
|
source ../config.hosts
|
||||||
|
server=$M_HOST_DEV
|
||||||
|
|
||||||
ssh $1@$server "tail -n 100 -f run.log"
|
ssh $1@$server "tail -n 100 -f run.log"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
if [ -z "$1" ]; then echo "Must supply name"; exit 0; fi
|
if [ -z "$1" ]; then echo "Must supply name"; exit 0; fi
|
||||||
|
|
||||||
server="blue"
|
source ../config.hosts
|
||||||
|
server=$M_HOST_PROD
|
||||||
|
|
||||||
echo stopping...
|
echo stopping...
|
||||||
ssh $1@$server "cd deploy && ./shutdown"
|
ssh $1@$server "cd deploy && ./shutdown"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
if [ -z "$1" ]; then echo "Must supply name"; exit 0; fi
|
if [ -z "$1" ]; then echo "Must supply name"; exit 0; fi
|
||||||
|
|
||||||
server="blue"
|
source ../config.hosts
|
||||||
|
server=$M_HOST_PROD
|
||||||
|
|
||||||
echo stopping...
|
echo stopping...
|
||||||
ssh $1@$server "cd deploy && ./shutdown"
|
ssh $1@$server "cd deploy && ./shutdown"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
if [ -z "$1" ]; then echo "Must supply name"; exit 0; fi
|
if [ -z "$1" ]; then echo "Must supply name"; exit 0; fi
|
||||||
|
|
||||||
server="blue"
|
source ../config.hosts
|
||||||
|
server=$M_HOST_PROD
|
||||||
|
|
||||||
echo stopping...
|
echo stopping...
|
||||||
ssh $1@$server "cd deploy && ./shutdown"
|
ssh $1@$server "cd deploy && ./shutdown"
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
server="blue"
|
source ../config.hosts
|
||||||
|
server=$M_HOST_PROD
|
||||||
|
|
||||||
echo restarting...
|
echo restarting...
|
||||||
ssh tomcat@$server "cd deploy && ./restart"
|
ssh tomcat@$server "cd deploy && ./restart"
|
||||||
|
3
host.config
Normal file
3
host.config
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
M_ROOT="ubuntu"
|
||||||
|
M_HOST_PROD="your-prod-host"
|
||||||
|
M_HOST_DEV="your-dev-host"
|
23
install/README_FIRST_EVEN_IF_YOU_DONT_WANT_TO
Normal file
23
install/README_FIRST_EVEN_IF_YOU_DONT_WANT_TO
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
Things you must do for this to work out of the box:
|
||||||
|
|
||||||
|
|
||||||
|
1. You must have .ssh keys for this account..
|
||||||
|
|
||||||
|
If you don't have them, generate them by googling "generate .ssh keys" and doing whatever it says.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2. You must go into the requirements directory and
|
||||||
|
|
||||||
|
a. run "./get_rsa_pub"
|
||||||
|
|
||||||
|
b. if you are going to install to an ec2 instance,
|
||||||
|
you must create the prod and dev instance and copy the key.pem file into requirements.
|
||||||
|
and then soft link the ec2-key.pem to your file.
|
||||||
|
|
||||||
|
c. and then, this is really important, you must
|
||||||
|
|
||||||
|
MUAHAHAHAHHAHAHA... just kidding, I'll write the rest soon.
|
||||||
|
|
13
install/create-server-account-user.remote
Executable file
13
install/create-server-account-user.remote
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
set -x
|
||||||
|
|
||||||
|
USER=$1
|
||||||
|
|
||||||
|
sudo useradd -m $USER
|
||||||
|
sudo usermod -s /bin/bash $USER
|
||||||
|
sudo mkdir ../$USER/.ssh
|
||||||
|
sudo cp authorized_keys ../$USER/.ssh
|
||||||
|
|
||||||
|
sudo chown $USER ../$USER/.ssh ../$USER/.ssh/*
|
||||||
|
sudo chgrp $USER ../$USER/.ssh ../$USER/.ssh/*
|
||||||
|
sudo chmod 0700 ../$USER/.ssh
|
||||||
|
sudo chmod 0644 ../$USER/.ssh/authorized_keys
|
12
install/create-server-accounts
Executable file
12
install/create-server-accounts
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
if [ -z "$1" ]; then echo "Must supply name"; exit 0; fi
|
||||||
|
|
||||||
|
set -x
|
||||||
|
source ../host.config
|
||||||
|
|
||||||
|
M_HOST=$1
|
||||||
|
|
||||||
|
scp -i requirements/ec2-key.pem requirements/id_rsa.pub $M_ROOT@$M_HOST:authorized_keys
|
||||||
|
scp -i requirements/ec2-key.pem create-server-accounts.remote $M_ROOT@$M_HOST:
|
||||||
|
scp -i requirements/ec2-key.pem create-server-account-user.remote $M_ROOT@$M_HOST:
|
||||||
|
ssh -i requirements/ec2-key.pem $M_ROOT@$M_HOST ./create-server-accounts.remote
|
||||||
|
|
8
install/create-server-accounts.remote
Executable file
8
install/create-server-accounts.remote
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
set -x
|
||||||
|
|
||||||
|
./create-server-account-user.remote james
|
||||||
|
./create-server-account-user.remote mail-user
|
||||||
|
./create-server-account-user.remote mail-key
|
||||||
|
./create-server-account-user.remote tomcat
|
||||||
|
./create-server-account-user.remote tunnel
|
||||||
|
./create-server-account-user.remote tools
|
1
install/requirements/ec2-key.pem
Symbolic link
1
install/requirements/ec2-key.pem
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
your-ec2-key.pem
|
1
install/requirements/get_rsa_pub
Executable file
1
install/requirements/get_rsa_pub
Executable file
@ -0,0 +1 @@
|
|||||||
|
cp ~/.ssh/id_rsa.pub .
|
7
install/setup-james
Executable file
7
install/setup-james
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
set -x
|
||||||
|
|
||||||
|
M_HOST=$1
|
||||||
|
|
||||||
|
scp setup-james.remote james@$M_HOST:
|
||||||
|
ssh james@$M_HOST ./setup-james.remote
|
||||||
|
|
11
install/setup-james.remote
Executable file
11
install/setup-james.remote
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
set -x
|
||||||
|
|
||||||
|
wget http://apache.mirrors.pair.com//james/apache-james/3.0beta4/apache-james-3.0-beta4-app.tar.gz
|
||||||
|
tar xzvf apache-james-3.0-beta4-app.tar.gz
|
||||||
|
|
||||||
|
ln -s apache-james-3.0-beta4 apache-james
|
||||||
|
cd apache-james
|
||||||
|
mv conf conf-original
|
||||||
|
ln -s ../apache-james-conf conf
|
||||||
|
|
||||||
|
echo The final pieces will be installed during deploy
|
9
install/setup-servers
Executable file
9
install/setup-servers
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
set -x
|
||||||
|
source ../host.config
|
||||||
|
|
||||||
|
./create-server-accounts $M_HOST_PROD
|
||||||
|
./create-server-accounts $M_HOST_DEV
|
||||||
|
|
||||||
|
./setup-james $M_HOST_PROD
|
||||||
|
./setup-james $M_HOST_DEV
|
||||||
|
|
Loading…
Reference in New Issue
Block a user