taperole 1.7.0 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -100
- data/lib/taperole/core/ansible_runner.rb +1 -1
- data/lib/taperole/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b15707ed1842c5ad02b43a131ec2d11b8fd08fc
|
4
|
+
data.tar.gz: aaf7a59cee5519c395d0588541489582b9e7661f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1900fdc9620dc002b61ebe92c4324f1bd604fa13356ed34ca59dc0e675bb4e8c4d9e09eebaac66b6ff77dbd7acac89b134c5327a2cff74e6c6cce3c833220b51
|
7
|
+
data.tar.gz: 37d642680a02f9117dbbc7e666df7d138b7e99292bf172fc89c0492cd23506859b7bfd24aa5244a835e81c732663caa015bea1df74f9e01f95e855b806a3e807
|
data/README.md
CHANGED
@@ -13,9 +13,11 @@ For a tutorial on getting started: [Taperole: the Smashing Boxes Way to Deploy Y
|
|
13
13
|
|
14
14
|
**Install**
|
15
15
|
|
16
|
-
*
|
16
|
+
*Deprecation notice*: As of taperole 1.7, support for Ubuntu 14.x has been deprecated. If your server does not use Ubuntu 16.x, please install taperole 1.6.0 instead.
|
17
|
+
|
18
|
+
* `$ gem install taperole` or add `gem 'taperole', '~>1.7'` to your Gemfile
|
17
19
|
* `$ brew install ansible`
|
18
|
-
* Create a [Digital Ocean Droplet](https://www.digitalocean.com/) (or any Ubuntu
|
20
|
+
* Create a [Digital Ocean Droplet](https://www.digitalocean.com/) (or any Ubuntu 16.04 system with ssh access)
|
19
21
|
* Run `tape installer install` in project repo
|
20
22
|
* Update your hosts file with the IP address of your server (this can be found in your Droplet). If you go down to "Multistage", you'll see an excellent example of what your hosts file should look like.
|
21
23
|
* Fill in missing values in `tape_vars.yml`. Should look something like this:
|
@@ -25,12 +27,12 @@ app_name: [app name]
|
|
25
27
|
be_app_repo: [git repo]
|
26
28
|
```
|
27
29
|
|
28
|
-
* Copy all developers public keys into
|
29
|
-
* `$ tape ansible everything`
|
30
|
+
* Copy all developers' public keys into the `taperole/dev_keys` directory.
|
31
|
+
* Use `$ tape ansible everything` for your first deploy, then `$ tape ansible deploy` for subsequent changes.
|
30
32
|
|
31
33
|
**Upgrade**
|
32
34
|
|
33
|
-
**NOTE
|
35
|
+
**NOTE**: Upgrading tape on a machine is only supported for patch versions (ie 1.3.0 to 1.3.1). For minor or major versions, it is advised that you stand up a new box, and start from stratch.
|
34
36
|
|
35
37
|
```bash
|
36
38
|
bundle update taperole
|
@@ -101,7 +103,6 @@ tape ansible deploy -l staging
|
|
101
103
|
## Testing
|
102
104
|
### With vagrant
|
103
105
|
|
104
|
-
|
105
106
|
1. `echo 'y' | tape installer install`
|
106
107
|
1. `vagrant up`
|
107
108
|
2. Put the following into your [hosts inventory file](http://docs.ansible.com/intro_inventory.html):
|
@@ -135,25 +136,10 @@ cd tape
|
|
135
136
|
ansible-galaxy install -r requirements.yml --force
|
136
137
|
```
|
137
138
|
|
138
|
-
##
|
139
|
-
|
140
|
-
### Local System Requirements
|
141
|
-
|
142
|
-
We're assuming that you're starting with the following things installed and working on your local machine:
|
143
|
-
* unix based operating system
|
144
|
-
* ruby (version 1.9.3 or greater)
|
145
|
-
* Run `$ ruby --version`. You should see something like `ruby 2.2.3p173` in the output. If you see nothing or get an error, you need to install ruby. If you see something less than 1.9.3, you need to upgrade.
|
146
|
-
* an ssh key
|
147
|
-
* You'll need an ssh key to set up access to your server. GitHub has a [great tutorial](https://help.github.com/articles/generating-ssh-keys/) on this.
|
148
|
-
* git and GitHub (or another remote host for your code)
|
149
|
-
* Here's a good article on how to get going with git: https://help.github.com/articles/set-up-git/.
|
150
|
-
* ansible
|
151
|
-
* On a mac, we suggest using Homebrew to install ansible(`brew install ansible`). Otherwise, please refer to the ansible documentation: http://docs.ansible.com/ansible/intro_installation.html.
|
152
|
-
|
153
|
-
### Rails Application Requirements
|
139
|
+
## Rails Application Requirements
|
154
140
|
|
155
141
|
Your rails application must:
|
156
|
-
* use
|
142
|
+
* use postgres as the database
|
157
143
|
* use unicorn as the app server
|
158
144
|
* have access to the taperole gem
|
159
145
|
|
@@ -166,95 +152,23 @@ gem 'pg'
|
|
166
152
|
gem 'unicorn'
|
167
153
|
|
168
154
|
# Use taperole for deployment
|
169
|
-
gem 'taperole', '~>1.
|
155
|
+
gem 'taperole', '~>1.7'
|
170
156
|
|
171
157
|
```
|
172
|
-
Note: You can also `$ gem install taperole` and not put Taperole in your Gemfile.
|
173
|
-
|
174
|
-
### Your Host Server
|
175
|
-
|
176
|
-
Below are instructions for creating a digital ocean droplet to host your application.
|
177
|
-
This is not required, as long as you have root access via ssh to an Unbuntu precise64 (14.04 x64) server.
|
178
|
-
|
179
|
-
1. Click "Create Droplet"
|
180
|
-
2. Name your droplet. (For the purposes of this example, we'll be calling our droplet 'walkthrough'.)
|
181
|
-
3. Select a size for your droplet. The smallest size is fine for our purposes, but if you're deploying a larger app, select whatever size is appropriate.
|
182
|
-
4. Select a datacenter region.
|
183
|
-
5. Choose Ubuntu 14.04.3 x64 as your image.
|
184
|
-
6. Add your ssh key to the droplet.
|
185
|
-
7. Create the droplet!
|
186
158
|
|
187
|
-
|
188
|
-
|
189
|
-
`$ pwd` in the server and you should see `/root`.
|
190
|
-
`$ exit` to get close your session.
|
159
|
+
Note: You can also `$ gem install taperole` and not put Taperole in your
|
160
|
+
Gemfile.
|
191
161
|
|
192
|
-
|
162
|
+
During your first deploy, your app will not have a `secrets.yml` file configured, and Tape will prompt you to provide one:
|
193
163
|
|
194
|
-
1. Confirm that `taperole`, `pg`, and `unicorn` are in your gemfile.
|
195
|
-
2. `$ bundle`
|
196
|
-
3. When asked `Are you going to use vagrant? (y/n):`, say `n`.
|
197
|
-
4. Make your hosts file. Assuming you're going to have multiple environments, it should look something like this:
|
198
|
-
```
|
199
|
-
[production]
|
200
|
-
0.0.0.0 be_app_env=production be_app_branch=master
|
201
|
-
|
202
|
-
[omnibox:children]
|
203
|
-
production
|
204
|
-
```
|
205
|
-
5. Give yourself access to the server. This needs to be the same ssh key that you used on your digital ocean droplet. So create a file called <your_name>.pub in the dev_keys folder that was generated by tape installer install. `pbcopy < ~/.ssh/id_rsa.pub` in your terminal again, then paste the result into the file you just created.
|
206
|
-
6. Update your tape_vars.yml file.
|
207
|
-
```
|
208
|
-
app_name: walkthrough
|
209
|
-
|
210
|
-
be_app_repo: [git repo]
|
211
|
-
|
212
|
-
dev_key_files:
|
213
|
-
- dev_keys/your_name.pub
|
214
|
-
```
|
215
|
-
7. Copy all developers public keys into the `dev_keys` directory.
|
216
|
-
8. Add this to your gitignore.
|
217
|
-
```
|
218
|
-
# Ignore this stuff for Taperole
|
219
|
-
config/secrets.yml
|
220
|
-
config/database.yml
|
221
|
-
```
|
222
|
-
9. If it isn't automatically, comment out front end stuff:
|
223
|
-
* `# fe_deploy` in omnibox.yml
|
224
|
-
* `# - frontend_deploy` in deploy.yml
|
225
|
-
|
226
|
-
10. git add and commit and push to master
|
227
|
-
11. Run `$ tape ansible everything.` This will take a long time, so grab a sandwich or something.
|
228
|
-
12. This should chug right along until it gets to
|
229
164
|
```
|
230
165
|
TASK: [backend_config | Ask for secrets.yml] **********************************
|
231
166
|
ok: [159.203.126.223] => {
|
232
167
|
"msg": "You've got to upload secrets.yml to /home/deployer/kevinrkiley/config to continue"
|
233
168
|
}
|
234
169
|
```
|
235
|
-
where it will hang. Don't cancel the deploy.
|
236
|
-
13. Open a new terminal tab and generate a secret key by running `$ rake secret` from the root directory of your rails app. Don't lose this.
|
237
|
-
14. Run `$ ssh deployer@<ip_to_server>`
|
238
|
-
15. Once you're in the server, `$ cd walkthrough/config`. If you `$ ls`, you should see that there is no `secrets.yml` file. `$ vi secrets.yml` to create it.
|
239
|
-
16. When you're done secrets.yml should look something like:
|
240
|
-
```
|
241
|
-
production:
|
242
|
-
secret_key_base: thisisthesecretkeyyougeneratedinstep9
|
243
|
-
```
|
244
|
-
17. Your deployment should automatically continue.
|
245
|
-
|
246
|
-
|
247
|
-
### Deploying your latest changes
|
248
|
-
|
249
|
-
To deploy your latest changes to your tape-provisioned server:
|
250
|
-
|
251
|
-
```
|
252
|
-
tape ansible deploy
|
253
|
-
```
|
254
|
-
|
255
|
-
This will git pull the latest changes from the tracking branch you specified and restart all services via monit.
|
256
170
|
|
257
|
-
|
171
|
+
To continue the deploy, SSH into the server as the `deployer` user and create your `config/secrets.yml` file in the app directory. The deploy will automatically continue when the file is saved.
|
258
172
|
|
259
173
|
### Rake tasks
|
260
174
|
|
@@ -48,7 +48,7 @@ module Taperole
|
|
48
48
|
cmd = "ANSIBLE_CONFIG=#{local_dir}/.tape/ansible.cfg ansible-playbook -i"
|
49
49
|
cmd += " #{inventory_file(options)} #{playbook} #{args} #{hosts_flag(options)}"
|
50
50
|
cmd += " -e tape_dir=#{tape_dir}"
|
51
|
-
cmd += ' --ask-vault-pass' if options[
|
51
|
+
cmd += ' --ask-vault-pass' if options['ask-vault-pass']
|
52
52
|
cmd += ' -vvvv' if options[:verbose]
|
53
53
|
cmd += " -t #{options[:tags]}" if options[:tags]
|
54
54
|
logger.info "Executing: #{cmd}" if options[:verbose]
|
data/lib/taperole/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: taperole
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jack Forrest
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-10-
|
13
|
+
date: 2016-10-21 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: slack-notifier
|