devnomads-cli 0.14.0__tar.gz → 0.15.0__tar.gz
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.
- {devnomads_cli-0.14.0 → devnomads_cli-0.15.0}/PKG-INFO +35 -5
- {devnomads_cli-0.14.0 → devnomads_cli-0.15.0}/README.md +34 -4
- {devnomads_cli-0.14.0 → devnomads_cli-0.15.0}/devnomads_cli.egg-info/PKG-INFO +35 -5
- {devnomads_cli-0.14.0 → devnomads_cli-0.15.0}/dncli.py +586 -190
- {devnomads_cli-0.14.0 → devnomads_cli-0.15.0}/pyproject.toml +1 -1
- {devnomads_cli-0.14.0 → devnomads_cli-0.15.0}/tests/test_generate.py +36 -0
- {devnomads_cli-0.14.0 → devnomads_cli-0.15.0}/tests/test_sites_publish.py +259 -24
- devnomads_cli-0.15.0/tests/test_sites_ssh.py +149 -0
- devnomads_cli-0.14.0/tests/test_sites_ssh.py +0 -124
- {devnomads_cli-0.14.0 → devnomads_cli-0.15.0}/LICENSE +0 -0
- {devnomads_cli-0.14.0 → devnomads_cli-0.15.0}/devnomads_cli.egg-info/SOURCES.txt +0 -0
- {devnomads_cli-0.14.0 → devnomads_cli-0.15.0}/devnomads_cli.egg-info/dependency_links.txt +0 -0
- {devnomads_cli-0.14.0 → devnomads_cli-0.15.0}/devnomads_cli.egg-info/entry_points.txt +0 -0
- {devnomads_cli-0.14.0 → devnomads_cli-0.15.0}/devnomads_cli.egg-info/requires.txt +0 -0
- {devnomads_cli-0.14.0 → devnomads_cli-0.15.0}/devnomads_cli.egg-info/top_level.txt +0 -0
- {devnomads_cli-0.14.0 → devnomads_cli-0.15.0}/setup.cfg +0 -0
- {devnomads_cli-0.14.0 → devnomads_cli-0.15.0}/tests/test_agent_features.py +0 -0
- {devnomads_cli-0.14.0 → devnomads_cli-0.15.0}/tests/test_cert.py +0 -0
- {devnomads_cli-0.14.0 → devnomads_cli-0.15.0}/tests/test_cli.py +0 -0
- {devnomads_cli-0.14.0 → devnomads_cli-0.15.0}/tests/test_config.py +0 -0
- {devnomads_cli-0.14.0 → devnomads_cli-0.15.0}/tests/test_generated_cli.py +0 -0
- {devnomads_cli-0.14.0 → devnomads_cli-0.15.0}/tests/test_helpers.py +0 -0
- {devnomads_cli-0.14.0 → devnomads_cli-0.15.0}/tests/test_hook.py +0 -0
- {devnomads_cli-0.14.0 → devnomads_cli-0.15.0}/tests/test_transfer.py +0 -0
- {devnomads_cli-0.14.0 → devnomads_cli-0.15.0}/tests/test_versions.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: devnomads-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.15.0
|
|
4
4
|
Summary: Manage your DevNomads services from the command line
|
|
5
5
|
Author-email: DevNomads <support@devnomads.nl>
|
|
6
6
|
License: MIT
|
|
@@ -119,10 +119,9 @@ dncli sites ssh example.com -- ls -la # run one command
|
|
|
119
119
|
dncli sites ssh example.com --dry-run # print the ssh command
|
|
120
120
|
```
|
|
121
121
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
it without the question, for example in a script. Anything after `--`
|
|
122
|
+
dncli logs in on the host the API lists for the site. A site that runs
|
|
123
|
+
on several hosts (an HA cluster) asks which one; pick it with `--host`
|
|
124
|
+
to skip the question, for example in a script. Anything after `--`
|
|
126
125
|
goes to ssh: extra options (`-- -p 2222`) or a remote command.
|
|
127
126
|
|
|
128
127
|
ssh logs in with your SSH key when the site has it (`dncli sites keys
|
|
@@ -166,6 +165,37 @@ into its own folder (uploads, caches) are not carried over. Switching
|
|
|
166
165
|
mode changes the live site, so dncli asks first (`--yes` skips the
|
|
167
166
|
question); the old mode's files stay on the server, no longer served.
|
|
168
167
|
|
|
168
|
+
**Commands after the upload.** `--run` runs a command on the server in
|
|
169
|
+
the uploaded folder, such as `composer install`; repeat it for more, they
|
|
170
|
+
run in the order given. In release mode the commands run in the new
|
|
171
|
+
release before it goes live, so a failing command stops the publish and
|
|
172
|
+
the site keeps serving the previous release. `--run-once` is for what
|
|
173
|
+
must happen only once, like a database migration: on a site with several
|
|
174
|
+
hosts it runs on the first host only, after all `--run` commands:
|
|
175
|
+
|
|
176
|
+
```sh
|
|
177
|
+
dncli sites publish example.com . --exclude vendor/ \
|
|
178
|
+
--run 'composer install --no-dev --optimize-autoloader' \
|
|
179
|
+
--run-once 'php artisan migrate --force'
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
**Sites on several hosts.** A site that runs on several hosts (an HA
|
|
183
|
+
cluster) gets every publish on all of them: dncli uploads to and runs
|
|
184
|
+
the commands on every host first, and only then switches them, so the
|
|
185
|
+
hosts serve different releases only for the moment the switches take.
|
|
186
|
+
`rollback` switches every host too. `--host` limits a command to one
|
|
187
|
+
of them.
|
|
188
|
+
|
|
189
|
+
**From a CI pipeline.** A pipeline has no terminal, so ssh cannot ask
|
|
190
|
+
for a password or whether to trust a host it has not seen before. Give
|
|
191
|
+
the pipeline an SSH key that is attached to the site (`dncli sites keys
|
|
192
|
+
attach`), the hosts' keys in `known_hosts` and the API key in `DN_API_KEY`:
|
|
193
|
+
|
|
194
|
+
```sh
|
|
195
|
+
mkdir -p ~/.ssh && ssh-keyscan web01.example.com >> ~/.ssh/known_hosts
|
|
196
|
+
dncli sites publish example.com . --run 'composer install --no-dev'
|
|
197
|
+
```
|
|
198
|
+
|
|
169
199
|
## Managing DNS
|
|
170
200
|
|
|
171
201
|
```sh
|
|
@@ -103,10 +103,9 @@ dncli sites ssh example.com -- ls -la # run one command
|
|
|
103
103
|
dncli sites ssh example.com --dry-run # print the ssh command
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
it without the question, for example in a script. Anything after `--`
|
|
106
|
+
dncli logs in on the host the API lists for the site. A site that runs
|
|
107
|
+
on several hosts (an HA cluster) asks which one; pick it with `--host`
|
|
108
|
+
to skip the question, for example in a script. Anything after `--`
|
|
110
109
|
goes to ssh: extra options (`-- -p 2222`) or a remote command.
|
|
111
110
|
|
|
112
111
|
ssh logs in with your SSH key when the site has it (`dncli sites keys
|
|
@@ -150,6 +149,37 @@ into its own folder (uploads, caches) are not carried over. Switching
|
|
|
150
149
|
mode changes the live site, so dncli asks first (`--yes` skips the
|
|
151
150
|
question); the old mode's files stay on the server, no longer served.
|
|
152
151
|
|
|
152
|
+
**Commands after the upload.** `--run` runs a command on the server in
|
|
153
|
+
the uploaded folder, such as `composer install`; repeat it for more, they
|
|
154
|
+
run in the order given. In release mode the commands run in the new
|
|
155
|
+
release before it goes live, so a failing command stops the publish and
|
|
156
|
+
the site keeps serving the previous release. `--run-once` is for what
|
|
157
|
+
must happen only once, like a database migration: on a site with several
|
|
158
|
+
hosts it runs on the first host only, after all `--run` commands:
|
|
159
|
+
|
|
160
|
+
```sh
|
|
161
|
+
dncli sites publish example.com . --exclude vendor/ \
|
|
162
|
+
--run 'composer install --no-dev --optimize-autoloader' \
|
|
163
|
+
--run-once 'php artisan migrate --force'
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
**Sites on several hosts.** A site that runs on several hosts (an HA
|
|
167
|
+
cluster) gets every publish on all of them: dncli uploads to and runs
|
|
168
|
+
the commands on every host first, and only then switches them, so the
|
|
169
|
+
hosts serve different releases only for the moment the switches take.
|
|
170
|
+
`rollback` switches every host too. `--host` limits a command to one
|
|
171
|
+
of them.
|
|
172
|
+
|
|
173
|
+
**From a CI pipeline.** A pipeline has no terminal, so ssh cannot ask
|
|
174
|
+
for a password or whether to trust a host it has not seen before. Give
|
|
175
|
+
the pipeline an SSH key that is attached to the site (`dncli sites keys
|
|
176
|
+
attach`), the hosts' keys in `known_hosts` and the API key in `DN_API_KEY`:
|
|
177
|
+
|
|
178
|
+
```sh
|
|
179
|
+
mkdir -p ~/.ssh && ssh-keyscan web01.example.com >> ~/.ssh/known_hosts
|
|
180
|
+
dncli sites publish example.com . --run 'composer install --no-dev'
|
|
181
|
+
```
|
|
182
|
+
|
|
153
183
|
## Managing DNS
|
|
154
184
|
|
|
155
185
|
```sh
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: devnomads-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.15.0
|
|
4
4
|
Summary: Manage your DevNomads services from the command line
|
|
5
5
|
Author-email: DevNomads <support@devnomads.nl>
|
|
6
6
|
License: MIT
|
|
@@ -119,10 +119,9 @@ dncli sites ssh example.com -- ls -la # run one command
|
|
|
119
119
|
dncli sites ssh example.com --dry-run # print the ssh command
|
|
120
120
|
```
|
|
121
121
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
it without the question, for example in a script. Anything after `--`
|
|
122
|
+
dncli logs in on the host the API lists for the site. A site that runs
|
|
123
|
+
on several hosts (an HA cluster) asks which one; pick it with `--host`
|
|
124
|
+
to skip the question, for example in a script. Anything after `--`
|
|
126
125
|
goes to ssh: extra options (`-- -p 2222`) or a remote command.
|
|
127
126
|
|
|
128
127
|
ssh logs in with your SSH key when the site has it (`dncli sites keys
|
|
@@ -166,6 +165,37 @@ into its own folder (uploads, caches) are not carried over. Switching
|
|
|
166
165
|
mode changes the live site, so dncli asks first (`--yes` skips the
|
|
167
166
|
question); the old mode's files stay on the server, no longer served.
|
|
168
167
|
|
|
168
|
+
**Commands after the upload.** `--run` runs a command on the server in
|
|
169
|
+
the uploaded folder, such as `composer install`; repeat it for more, they
|
|
170
|
+
run in the order given. In release mode the commands run in the new
|
|
171
|
+
release before it goes live, so a failing command stops the publish and
|
|
172
|
+
the site keeps serving the previous release. `--run-once` is for what
|
|
173
|
+
must happen only once, like a database migration: on a site with several
|
|
174
|
+
hosts it runs on the first host only, after all `--run` commands:
|
|
175
|
+
|
|
176
|
+
```sh
|
|
177
|
+
dncli sites publish example.com . --exclude vendor/ \
|
|
178
|
+
--run 'composer install --no-dev --optimize-autoloader' \
|
|
179
|
+
--run-once 'php artisan migrate --force'
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
**Sites on several hosts.** A site that runs on several hosts (an HA
|
|
183
|
+
cluster) gets every publish on all of them: dncli uploads to and runs
|
|
184
|
+
the commands on every host first, and only then switches them, so the
|
|
185
|
+
hosts serve different releases only for the moment the switches take.
|
|
186
|
+
`rollback` switches every host too. `--host` limits a command to one
|
|
187
|
+
of them.
|
|
188
|
+
|
|
189
|
+
**From a CI pipeline.** A pipeline has no terminal, so ssh cannot ask
|
|
190
|
+
for a password or whether to trust a host it has not seen before. Give
|
|
191
|
+
the pipeline an SSH key that is attached to the site (`dncli sites keys
|
|
192
|
+
attach`), the hosts' keys in `known_hosts` and the API key in `DN_API_KEY`:
|
|
193
|
+
|
|
194
|
+
```sh
|
|
195
|
+
mkdir -p ~/.ssh && ssh-keyscan web01.example.com >> ~/.ssh/known_hosts
|
|
196
|
+
dncli sites publish example.com . --run 'composer install --no-dev'
|
|
197
|
+
```
|
|
198
|
+
|
|
169
199
|
## Managing DNS
|
|
170
200
|
|
|
171
201
|
```sh
|