-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
72 lines (45 loc) · 2.67 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
savv.sh - this script is the main script. It manages the ~/src/savvato.yaml file.
options
. (single period) -
sets the current project to the project defined in the current directory
run -
runs the current frontend project (if set) and all the backend dependencies as described in savvato.yaml
show -
returns a list of info about the current environment, current project,
whether the current project is frontend or backend,
and the IP addresses being used.
i-092537182637236 - Set the instance ID for the desired EC2 instance.
(ip address) -
if a backend project is current, it will set the IP address for
that project to the given IP.
(project name) -
sets the current project to the given project name
dev | staging | prod -
sets the current environment to dev, staging or prod
savv-deploy.sh - one command to send the frontend or backend to the appropriate environment
./environmental/bringItUp.sh
bring up the staging environment for your frontend app
./environment/shutItDown.sh
shut down the staging environment for your frontend app
./ec2-ssh
ssh into the current backend project's ec2 instance
run-ansible.sh - this script is for backend. It updates the inventory.yaml to refer the IP of the current
project. Then it runs the ansible playbook for that project. This updates the cloud EC2
instance with the most recently built Sprint Boot JAR.
savv-deploy.sh - This script does a complete clean build and deploy of the current project.
DEPRECATED
--
refresh-env-files.sh - this script is for frontend. It updates the environment.ts file with the IP addresses
of the backend services this project depends on. It then does a clean build, and copies
its files to an S3 bucket. The frontend is then available from that bucket.
No longer necessry because we use domain names for the backend dependencies, rather than potentially changing IP addresses. When the IP addresses do change, we update the domain name.
----
There is a clean base instance of EC2, an AWS Launch Template, called savvato-backend-api at: https://us-east-1.console.aws.amazon.com/ec2/home?region=us-east-1#LaunchTemplates:
Start a copy of that up, and run the project-local ansible against it. This creates your running backend server instance. You can run savv-deploy.sh to do this.
But to create the clean base instance, set the ip address in inventory-generic.yaml
ansible-playbook -i inventory-generic.yaml -u ubuntu --private-key /home/jjames/Downloads/ec2keypair1.pem playbook-generic.yaml
TODO, write a script to do that.
-------
STAGING
./bin/environmental has scripts to bring staging up and down.
Write more about that later.