orchestration 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/UPGRADE.md +90 -0
- data/lib/orchestration/make/orchestration.mk +2 -2
- data/lib/orchestration/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73d1e16807cf85124c5b8fdd635f24d814bfb425fb822ea2d8cec3386195b1ba
|
4
|
+
data.tar.gz: 64c7b4bc764947b2e9414c81c443e861ee1f7aee2811b0f238b78c3d21ddf879
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1615435866d1991f6aaae1cc0543bf7940f51a18343d5936098282c6ce999790ca6074de818c77b93a4ba8c1e85f1114c0a4a53f620d65326d5d484e4fe2c56b
|
7
|
+
data.tar.gz: 251feb2bb2b317cbb33292b6168833a0cee777a46f0f3d709a6e7dc2d721dbc72a6427962b9562825e1eb5174bc9f6dd6b18dd4a66a3132fc338c9184ffb5620
|
data/README.md
CHANGED
@@ -13,6 +13,8 @@ make deploy manager=user@swarm.example.com env_file=/var/configs/myapp.env
|
|
13
13
|
|
14
14
|
_Orchestration_ has been successfully used to build continuous delivery pipelines for numerous production applications with a wide range or requirements.
|
15
15
|
|
16
|
+
See [upgrade guide](UPGRADE.md) if you are upgrading from `0.5.x` to `0.6.x`.
|
17
|
+
|
16
18
|
## Example
|
17
19
|
|
18
20
|
The below screenshot demonstrates _Orchestration_ being installed in a brand new _Rails_ application with support for _PostgreSQL_ (via the _PG_ gem) and _RabbitMQ_ (via the _Bunny_ gem):
|
@@ -27,7 +29,7 @@ The below screenshot demonstrates _Orchestration_ being installed in a brand new
|
|
27
29
|
Add _Orchestration_ to your Gemfile:
|
28
30
|
|
29
31
|
```ruby
|
30
|
-
gem 'orchestration', '~> 0.6.
|
32
|
+
gem 'orchestration', '~> 0.6.2'
|
31
33
|
```
|
32
34
|
|
33
35
|
Install:
|
data/UPGRADE.md
ADDED
@@ -0,0 +1,90 @@
|
|
1
|
+
# Upgrade guide
|
2
|
+
|
3
|
+
## 0.5 to 0.6
|
4
|
+
|
5
|
+
### Delete/rename files
|
6
|
+
|
7
|
+
Delete all files from `orchestration/` directory except:
|
8
|
+
|
9
|
+
* `docker-compose.production.yml`
|
10
|
+
* `docker-compose.development.yml`
|
11
|
+
* `docker-compose.test.yml`
|
12
|
+
* `Dockerfile`
|
13
|
+
* `entrypoint.sh`
|
14
|
+
|
15
|
+
Rename:
|
16
|
+
|
17
|
+
```bash
|
18
|
+
orchestration/docker-compose.production.yml => orchestration/docker-compose.deployment.yml
|
19
|
+
```
|
20
|
+
|
21
|
+
Any environment-specific compose files (e.g. `staging`) should also be removed as the same compose file is now used for all deployment stages.
|
22
|
+
|
23
|
+
### Update Makefile
|
24
|
+
|
25
|
+
Remove the first line of the main `Makefile` (in root of project) and replace it with the new `include` declaration:
|
26
|
+
|
27
|
+
#### OLD
|
28
|
+
|
29
|
+
```make
|
30
|
+
include orchestration/Makefile
|
31
|
+
```
|
32
|
+
|
33
|
+
#### NEW
|
34
|
+
|
35
|
+
```make
|
36
|
+
include $(shell bundle exec ruby -e 'require "orchestration/make"')
|
37
|
+
```
|
38
|
+
|
39
|
+
#### Post-setup target
|
40
|
+
|
41
|
+
Add a new target anywhere in the `Makefile` called `post-setup`:
|
42
|
+
|
43
|
+
```make
|
44
|
+
.PHONY: post-setup
|
45
|
+
post-setup:
|
46
|
+
echo 'doing post setup stuff'
|
47
|
+
```
|
48
|
+
|
49
|
+
Replace the body of this target with any commands that you want to take place once the initial setup (launching development/test containers, running migrations, etc.) is complete. For example, running migrations for a secondary database.
|
50
|
+
|
51
|
+
### Continuous Integration files
|
52
|
+
|
53
|
+
Update any continuous integration scripts (e.g. `Jenkinsfile`) to run the `setup` target before `test`, e.g.:
|
54
|
+
|
55
|
+
#### OLD
|
56
|
+
|
57
|
+
```Jenkinsfile
|
58
|
+
stage('Test') {
|
59
|
+
steps {
|
60
|
+
sh 'make test sidecar=1'
|
61
|
+
}
|
62
|
+
}
|
63
|
+
```
|
64
|
+
|
65
|
+
#### NEW
|
66
|
+
|
67
|
+
```Jenkinsfile
|
68
|
+
stage('Test') {
|
69
|
+
steps {
|
70
|
+
sh 'make setup test sidecar=1'
|
71
|
+
}
|
72
|
+
}
|
73
|
+
```
|
74
|
+
|
75
|
+
(`sidecar` may or may not be needed depending on your setup but, if it was there prior to upgrade, then it should remain after upgrade).
|
76
|
+
|
77
|
+
### General Usage
|
78
|
+
|
79
|
+
All _Orchestration_ commands behave exactly the same as before with the exception of the `test` target. Now, instead of running `make test` to launch all containers and then run tests, _Rubocop_, etc., you must run `make setup test`.
|
80
|
+
|
81
|
+
This will set up the test environment and then run tests. You may then run `make test` to just run tests without having to go through the full setup process again.
|
82
|
+
|
83
|
+
Similarly you can set up the development environment by just running `make setup`.
|
84
|
+
|
85
|
+
To set up the test environment and run tests as two separate steps (i.e. equivalent of using the shorthand `make setup test`) you can run:
|
86
|
+
|
87
|
+
```bash
|
88
|
+
make setup RAILS_ENV=test
|
89
|
+
make test
|
90
|
+
```
|
@@ -437,12 +437,12 @@ endif
|
|
437
437
|
ifdef include
|
438
438
|
@$(call echo,Including files from: ${cyan}${include}${reset})
|
439
439
|
@(while read line; do \
|
440
|
-
_system
|
440
|
+
_system "echo '${system_prefix}' $$1 }"; \
|
441
441
|
export line; \
|
442
442
|
include_dir="${build_dir}/$$(dirname "$${line}")/" && \
|
443
443
|
mkdir -p "$${include_dir}" && cp "$${line}" "$${include_dir}" \
|
444
444
|
&& (cd '${orchestration_dir}/.build/' && tar rf 'context.tar' "$${line}"); \
|
445
|
-
_system "tar rf 'context.tar' '$${line}'"
|
445
|
+
_system "tar rf 'context.tar' '$${line}'"; \
|
446
446
|
done < '${include}') ${log} || ${exit_fail}
|
447
447
|
@$(call echo,Build context ${green}ready${reset} ${tick})
|
448
448
|
endif
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: orchestration
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Farrell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: database_url
|
@@ -349,6 +349,7 @@ files:
|
|
349
349
|
- Makefile
|
350
350
|
- README.md
|
351
351
|
- Rakefile
|
352
|
+
- UPGRADE.md
|
352
353
|
- bin/console
|
353
354
|
- bin/setup
|
354
355
|
- config/locales/en.yml
|