final tweaks for production

will now merge into master
ansible-ize
eric 2019-04-19 12:10:51 -04:00
parent 918f355415
commit 2e4b58e83a
2 changed files with 13 additions and 9 deletions

View File

@ -6,6 +6,7 @@ After=network.target
User=autocat User=autocat
Type=simple Type=simple
WorkingDirectory=/var/lib/autocat/autocat3 WorkingDirectory=/var/lib/autocat/autocat3
ExecStartPre=-/usr/bin/mkdir /var/run/autocat
ExecStart=/usr/local/bin/pipenv run python CherryPyApp.py ExecStart=/usr/local/bin/pipenv run python CherryPyApp.py
[Install] [Install]

View File

@ -2,11 +2,11 @@ sudo yum install git
#sudo yum install postgresql-server #sudo yum install postgresql-server
#sudo yum install postgresql-contrib #sudo yum install postgresql-contrib
# install py3 # install py3 (might not be the bast way to do this)
sudo yum install centos-release-scl #sudo yum install centos-release-scl
sudo yum install rh-python36 #sudo yum install rh-python36
scl enable rh-python36 bash #scl enable rh-python36 bash
#install pip #install pip
@ -22,24 +22,27 @@ sudo passwd autocat
sudo su - autocat sudo su - autocat
# create ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub using app key from the gutenbergtools/autocat3 repo # create ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub using app key from the gutenbergtools/autocat3 repo
# id_rsa should have permissions 600 # id_rsa should have permissions 400
mkdir .ssh mkdir .ssh
install -m 600 .ssh/id_rsa install -m 600 .ssh/id_rsa
touch .ssh/id_rsa.pub touch .ssh/id_rsa.pub
#!! from local #!! from local
# scp [local:]~.ssh/github [autocat@host:]~/.ssh/id_rsa # scp [local:]~.ssh/github [autocat@host:]~/.ssh/id_rsa
# scp [local:]~.ssh/github.pub [autocat@host:]~/.ssh/id_rsa.pub # scp [local:]~.ssh/github.pub [autocat@host:]~/.ssh/id_rsa.pub
chmod 600 .ssh/id_rsa chmod 400 .ssh/id_rsa
#set default python # create ~/.pgpass file to store password in format
# [pghost]:*:[pgdatabase]:[pguser]:[password]
chmod 400 .pgpass
#set default python - only needed if pu3 is
scl enable rh-python36 bash scl enable rh-python36 bash
echo 'source scl_source enable rh-python36' >> /var/lib/autocat/.bash_profile echo 'source scl_source enable rh-python36' >> /var/lib/autocat/.bash_profile
git clone git@github.com:gutenbergtools/autocat3.git git clone git@github.com:gutenbergtools/autocat3.git
cd autocat3 cd autocat3
pipenv --three pipenv --three
#git checkout remotes/origin/dev git checkout remotes/origin/master
git checkout remotes/origin/remove-ratelimit
pipenv install pipenv install
# add conf file # add conf file