You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
4. Obtain the “Keys of Power” from someone who can already deploy (ask Anand if you don’t know). Depending on what you want to deploy you’ll receive either `Test-runnable.pem`, `runnablevpc.pem`, or both.
22
+
23
+
5. Move the “Keys of Power” .pem files to your `~/.ssh` directory
24
+
25
+
At this point you should be capable of deploying;
26
+
keep reading to find out how to actually perform a deploy!
**IMPORTANT:** Before you deploy a new version of any project make sure to determine which version of the project is currently deployed. This way you can quickly revert to the last stable release if something goes wrong after pushing a new version.
33
+
34
+
Currently the easiest way to determine the current deploy version is to check the latest tag in the repository you are pushing. Note: If you just tagged a new release this would be the second latest tag.
35
+
36
+
Once you've found the correct tag, copy it down somewhere that is easily and quickly accessible, then continue your quest of deployment...
37
+
38
+
### Step 2: Deploy the Project via Ansible
39
+
**WARNING:** If you were unable to determine the last deploy tag for a project and cannot revert STOP HERE. Ask someone on the team for help before continuing.
40
+
41
+
From the devops-script/ansible directory here's how to deploy:
If, for some reason, the new deploy is not operating as expected you can quickly revert by referencing the tag you collected in Step 1. Simply run the appropriate deploy command in the previous section with the last release tag and the new deploy will be reverted.
71
+
72
+
## Deploy Songs
73
+
74
+
It is the custom at Runnable to play a song to the entire team when deploying. For each of the repositories here are the respective songs:
75
+
76
+
[api: Push it - Rick Ross](https://www.youtube.com/watch?v=qk2jeE1LOn8)
77
+
78
+
[runnable-angular: Push it to the limit - Scarface](https://www.youtube.com/watch?v=9D-QD_HIfjA)
Copy file name to clipboardExpand all lines: ansible/README.md
+6-100Lines changed: 6 additions & 100 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,106 +4,12 @@ Ansible provides a framework for our administration and deployment. It requires
4
4
Here is the organization of the files in `devops-scripts/ansible`
5
5
6
6
*`*-hosts` - Files naming all the servers
7
-
*`*.yml` - The top level ansible actions. These files describe how a host has vars and roles executed on it.
8
-
*`/group_vars` - yml files that define variables and values for your ansible scripts. This mostly maps one to one with machine types in AWS. They’re a key value map.
9
-
*`/library` - Third party libraries and scripts.
10
-
*`/roles` - A set of folders containing the ansible roles. A role defines the executable actions by ansible. The center pieces is the `/tasks/main.yml`. It defines name actions and requirements.
7
+
*`*.yml` - The top level ansible actions. These files describe how a host has vars and roles executed on it.
8
+
*`/group_vars` - yml files that define variables and values for your ansible scripts. This mostly maps one to one with machine types in AWS. They’re a key value map.
9
+
*`/library` - Third party libraries and scripts.
10
+
*`/roles` - A set of folders containing the ansible roles. A role defines the executable actions by ansible. The center pieces is the `/tasks/main.yml`. It defines name actions and requirements.
11
11
The role can have several sub folders.
12
-
*`/handlers` - ???
12
+
*`/handlers` - ???
13
13
*`/defaults` - ???
14
14
*`/meta` - contains dependencies
15
-
*`/template` - templates for any files that need to be generate and delivered.
16
-
17
-
# How to Deploy at Runnable
18
-
## Setup
19
-
20
-
Before you can deploy you'll need to install the appropriate tools, scripts, and keys on your local machine.
21
-
To do so, execute the following steps:
22
-
23
-
1. Install Ansible (the deploy automation tool we use to deploy projects to production)
24
-
http://docs.ansible.com/intro_installation.html
25
-
26
-
2. Get the latest devops-scripts (the recipes that we use to deploy various projects)
27
-
https://github.com/CodeNow/devops-scripts
28
-
29
-
3. Change to the devops scripts repo directory and run the following command:
4. Obtain the “Keys of Power” from someone who can already deploy (ask Anand if you don’t know). Depending on what you want to deploy you’ll receive either `Test-runnable.pem`, `runnablevpc.pem`, or both.
33
-
34
-
5. Move the “Keys of Power” .pem files to your `~/.ssh` directory
35
-
36
-
At this point you should be capable of deploying;
37
-
keep reading to find out how to actually perform a deploy!
**IMPORTANT:** Before you deploy a new version of any project make sure to determine which version of the project is currently deployed. This way you can quickly revert to the last stable release if something goes wrong after pushing a new version.
44
-
45
-
Currently the easiest way to determine the current deploy version is to check the latest tag in the repository you are pushing. Note: If you just tagged a new release this would be the second latest tag.
46
-
47
-
Once you've found the correct tag, copy it down somewhere that is easily and quickly accessible, then continue your quest of deployment...
48
-
49
-
### Step 2: Deploy the Project via Ansible
50
-
**WARNING:** If you were unable to determine the last deploy tag for a project and cannot revert STOP HERE. Ask someone on the team for help before continuing.
51
-
52
-
From the devops-script/ansible directory here's how to deploy:
If, for some reason, the new deploy is not operating as expected you can quickly revert by referencing the tag you collected in Step 1. Simply run the appropriate deploy command in the previous section with the last release tag and the new deploy will be reverted.
82
-
83
-
## Deploy Songs
84
-
85
-
It is the custom at Runnable to play a song to the entire team when deploying. For each of the repositories here are the respective songs:
86
-
87
-
[api: Push it - Rick Ross](https://www.youtube.com/watch?v=qk2jeE1LOn8)
88
-
89
-
[runnable-angular: Push it to the limit - Scarface](https://www.youtube.com/watch?v=9D-QD_HIfjA)
0 commit comments