From 04eca5fa22d3972dc18687aaf582f48f0c44b46c Mon Sep 17 00:00:00 2001 From: Yuanle Song Date: Sat, 28 Jan 2017 20:45:22 +0800 Subject: [PATCH] add files for deployment --- fabfile.py | 24 ++++++++++++++++++++++++ favicon.ico | Bin 0 -> 588 bytes operational | 11 +++++++++++ 3 files changed, 35 insertions(+) create mode 100644 fabfile.py create mode 100644 favicon.ico diff --git a/fabfile.py b/fabfile.py new file mode 100644 index 0000000..72d2170 --- /dev/null +++ b/fabfile.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python +# coding=utf-8 + +""" +deploy to prod +""" + +from fabric.api import env, sudo, run, local, hosts, put, cd, lcd + +env.use_ssh_config = True + + +SERVER = 'de01' + + +def deploy(): + with lcd("~/websites/rpn-calculator/"): + local("rsync -n -irt calc.html fifo.js fsm.js sw.js vendor/ favicon.ico" + " %s:/var/www/rpn.emacsos.com/" % (SERVER,)) + + +@hosts(SERVER) +def init(): + run("mkdir -p /var/www/rpn.emacsos.com/") diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..6702382d34f577cdbab297d76c2a8b0b638d0ab5 GIT binary patch literal 588 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4i*LmhONKMUokK+FeQ1ryDYWU|=ut^mS#w!^6)Y&UdXr$%ui0@vf(fV~EE2+@6csLWK;+ z_uu<_<+Gn`)w$@~UwU53<^`AMU60BBZjiWIlvVVLg7UXZ&W^TM>;+gI|FYVClUXD8 z&7$z2$D#tkO`a}EO?lbYb06lI{`@N7=s5p4zr3ATLdq7yS`F*U`={SO4Ps?DR`s%D z<_n7{Prs#yb%sxuI5~ak>f~a<4pIZLYnR_S>kH z0{0mi0vMP#tJ`#OWqeEFx{)M&aiJswgTw)*2BWXX4#v#Se!L=;d&woY)LC_ZWj8Pw za7?Sn>FYgr_HgOuBz`mXKWB^h{tKD=ZMr0y$ZBzSc^{+TpHhZ~xn9R6Yj=Fk$@s1F seRHJA$M{K!<$W^I_IIECpAkRZYx>K#Yxi$qU|?YIboFyt=akR{04<{XvH$=8 literal 0 HcmV?d00001 diff --git a/operational b/operational index 11e35dc..37eb64c 100644 --- a/operational +++ b/operational @@ -86,6 +86,17 @@ I prefer either native app or real website. - add link on www.emacsos.com. - write a blog post about it. techs used in the project. and source repo. +- deploy notes + create ./fabfile.py + create ~/projects/salt/rpn-emacsos-com/init.sls + create ~/projects/salt/rpn-emacsos-com/cert.sls + create ~/projects/salt/rpn-emacsos-com/rpn.emacsos.com.conf + + Can I reuse the same cert from www.emacsos.com? I need to regenerate cert. + No wildcard cert is not convenient. + + TODO create SSL cert for rpn.emacsos.com + ** 2017-01-28 add more content in about page. - fill in link for #TODO link in about page. - add LICENSE info and source code repo address in about overlay. -- GitLab