et_full_system 0.1.39 → 0.1.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +40 -10
- data/lib/et_full_system/cli/docker.rb +1 -1
- data/lib/et_full_system/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '08bde4482164de2dd1e60e2ec4b199aa6cba0a4915cdaa4b0d8d187995d30c99'
|
|
4
|
+
data.tar.gz: 90a09d9e484a60b2931cd57192293228c761eeefedc777f25389cb0baf338c03
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '092cb07b3fd1e6f086a30a7b675cfe85c8d06748cc4b531274a710aefdc1aa243f4aaf99a3004020f5b568f437f09611998ac64c6922033e1e7c35d5d8b2585f'
|
|
7
|
+
data.tar.gz: 46bab84cfa048119c8cd58dad5fee4bd208543adcf23f4191c18e07dd48af99d504b917ed82c07e9288552d9de708723b6d5b523b7bbbbba943862c8427e97f3
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -67,11 +67,9 @@ github directly.
|
|
|
67
67
|
Add this line to your application's Gemfile:
|
|
68
68
|
|
|
69
69
|
```ruby
|
|
70
|
-
gem 'et_full_system', '0.1
|
|
70
|
+
gem 'et_full_system', '~> 0.1'
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
-
Replacing the version numbers and git ref according to the latest version.
|
|
74
|
-
|
|
75
73
|
And then execute:
|
|
76
74
|
|
|
77
75
|
$ bundle
|
|
@@ -80,15 +78,11 @@ And if you want to install a binstub (do bundle help binstubs for more options y
|
|
|
80
78
|
|
|
81
79
|
$ bundle binstubs et_full_system --standalone
|
|
82
80
|
|
|
83
|
-
### Installing Direct
|
|
81
|
+
### Installing Direct
|
|
84
82
|
|
|
85
|
-
Or install it yourself directly from
|
|
83
|
+
Or install it yourself directly from rubygems as follows:
|
|
86
84
|
|
|
87
|
-
$
|
|
88
|
-
$ cd et_full_system_gem
|
|
89
|
-
$ gem build et_full_system -o et_full_system.gem
|
|
90
|
-
$ gem install et_full_system.gem
|
|
91
|
-
$ rm et_full_system.gem
|
|
85
|
+
$ gem install et_full_system
|
|
92
86
|
|
|
93
87
|
## Usage (using docker)
|
|
94
88
|
|
|
@@ -127,6 +121,42 @@ Where <service_name> is either et1, et3, admin, api or atos
|
|
|
127
121
|
and <service_url> must be a URL that is reachable from the docker container - you may need to use the special 'host.docker.internal'
|
|
128
122
|
or in general checkout this page https://docs.docker.com/docker-for-mac/networking/ or https://docs.docker.com/docker-for-windows/networking/
|
|
129
123
|
|
|
124
|
+
Note, you need to really think when you are doing this. If you have 2 services running (one local, one in docker) - what will happen ? In the
|
|
125
|
+
case of a web server, nothing - it will just waste resources - but if you have 2 sidekiq's running and they are pointing to the same redis
|
|
126
|
+
database, then they will both process jobs, meaning you might not see the jobs being taken by your local version.
|
|
127
|
+
|
|
128
|
+
### Examples Of Local Hosting
|
|
129
|
+
|
|
130
|
+
#### Web Server Only
|
|
131
|
+
|
|
132
|
+
Say I am working on a Mac and I wanted to work on some front end stuff in ET1 but wasn't touching any
|
|
133
|
+
background jobs in sidekiq - I would do this (with et_full_system docker server already running) :-
|
|
134
|
+
|
|
135
|
+
$ et_full_system docker update_service_url et1 http://docker.host.internal:3000
|
|
136
|
+
|
|
137
|
+
And then start your local server, not forgetting any important environment variables (hint - to see what the docker version has them
|
|
138
|
+
set to - do use the service_env command as previously mentioned)
|
|
139
|
+
|
|
140
|
+
This would leave the docker et1 running, but the reverse proxy (traefik) would be sending all traffic to your local server
|
|
141
|
+
|
|
142
|
+
#### Web Server AND Sidekiq
|
|
143
|
+
|
|
144
|
+
Say I am working on a Mac and I wanted to work on some front end stuff that includes the background jobs.
|
|
145
|
+
I need to redirect the web server, however I also need to prevent sidekiq from running on the server - and whilst I am at it,
|
|
146
|
+
I may as well tell it not to run the web server - so ive got more memory available on my machine.
|
|
147
|
+
I also want the database server and the sidekiq server to be available to save me running them
|
|
148
|
+
|
|
149
|
+
First, I would stop the existing et_full_system docker server, then restart it with the following command
|
|
150
|
+
|
|
151
|
+
$ DB_PORT=5432 REDIS_PORT=6379 et_full_system docker server --without=et1_web et1_sidekiq
|
|
152
|
+
|
|
153
|
+
The DB_PORT and REDIS_PORT env vars tell the docker system to forward those ports to your local machine. If you dont want to
|
|
154
|
+
do that as you have your own database and redisk server, leave that out - but as always, think about what you are doing. If this
|
|
155
|
+
were the API for example, both admin and et_atos_file_transfer services share the same database - if yours were isolated then things
|
|
156
|
+
wouldnt go to plan.
|
|
157
|
+
|
|
158
|
+
The --without flag tells the system to start up, but exclude et1_web and et1_sidekiq
|
|
159
|
+
|
|
130
160
|
|
|
131
161
|
## Usage (Without docker)
|
|
132
162
|
|
|
@@ -65,7 +65,7 @@ module EtFullSystem
|
|
|
65
65
|
def service_env(service)
|
|
66
66
|
Bundler.with_original_env do
|
|
67
67
|
gem_root = File.absolute_path('../../..', __dir__)
|
|
68
|
-
cmd = "/bin/bash --login -c \"et_full_system local service_env #{service}
|
|
68
|
+
cmd = "/bin/bash --login -c \"et_full_system local service_env #{service}\""
|
|
69
69
|
compose_cmd = "docker-compose -f #{gem_root}/docker/docker-compose.yml exec et #{cmd}"
|
|
70
70
|
puts compose_cmd
|
|
71
71
|
exec(compose_cmd)
|