@@ -342,7 +342,7 @@ Deploying
342
342
Centurion supports a number of tasks out of the box that make working with
343
343
distributed containers easy. Here are some examples:
344
344
345
- ###Do a rolling deployment to a fleet of Docker servers
345
+ ### Do a rolling deployment to a fleet of Docker servers
346
346
347
347
A rolling deployment will stop and start each container one at a time to make
348
348
sure that the application stays available from the viewpoint of the load
@@ -352,9 +352,9 @@ the root path of the application. The healthcheck endpoint is configurable by ad
352
352
` set(:status_endpoint, '/somewhere/else') ` in your config. The status endpoint
353
353
must respond with a valid response in the 200 status range.
354
354
355
- ```` bash
355
+ ``` bash
356
356
$ bundle exec centurion -p radio-radio -e staging -a rolling_deploy
357
- ````
357
+ ```
358
358
359
359
** Custom Health Check** :
360
360
You can use a custom health check by specifying a callable object (anything that
@@ -365,7 +365,7 @@ should return a truthy value, falsey otherwise. Here's an example of a custom
365
365
health check that verifies that an elasticsearch node is up and has joined the
366
366
cluster.
367
367
368
- ```` ruby
368
+ ``` ruby
369
369
def cluster_green? (target_server , port , endpoint )
370
370
response = begin
371
371
Excon .get(" http://#{ target_server.hostname } :#{ port } #{ endpoint } " )
@@ -386,7 +386,7 @@ task :production => :common do
386
386
host ' es-01.example.com'
387
387
host ' es-02.example.com'
388
388
end
389
- ````
389
+ ```
390
390
391
391
** Rolling Deployment Settings** :
392
392
You can change the following settings in your config to tune how the rolling
@@ -412,35 +412,36 @@ are the same everywhere. Settings are per-project.
412
412
that are. The default is an empty array. If you have non-HTTP services that you
413
413
want to check, see Custom Health Checks in the previous section.
414
414
415
- ###Deploy a project to a fleet of Docker servers
415
+ ### Deploy a project to a fleet of Docker servers
416
416
417
417
This will hard stop, then start containers on all the specified hosts. This
418
418
is not recommended for apps where one endpoint needs to be available at all
419
419
times. It is fast.
420
420
421
- ```` bash
421
+ ``` bash
422
422
$ bundle exec centurion -p radio-radio -e staging -a deploy
423
- ````
423
+ ```
424
424
425
- ###Deploy a bash console on a host
425
+ ### Deploy a bash console on a host
426
426
427
427
This will give you a command line shell with all of your existing environment
428
428
passed to the container. The ` CMD ` from the ` Dockerfile ` will be replaced
429
429
with ` /bin/bash ` . It will use the first host from the host list.
430
430
431
- ```` bash
431
+ ``` bash
432
432
$ bundle exec centurion -p radio-radio -e staging -a deploy_console
433
- ````
433
+ ```
434
+
434
435
### Repair unhealthy docker containers
435
436
436
437
This will preform a health check on each host using rolling deployment
437
438
health check settings and redeploy to the host if a health check fails.
438
439
439
- ```` bash
440
+ ``` bash
440
441
$ bundle exec centurion -p radio-radio -e staging -a repair
441
- ````
442
+ ```
442
443
443
- ###List all the tags running on your servers for a particular project
444
+ ### List all the tags running on your servers for a particular project
444
445
445
446
Returns a nicely-formatted list of all the current tags and which machines they
446
447
are running on. Gives a unique list of tags across all hosts as well. This is
@@ -451,7 +452,7 @@ goes wrong mid-deploy.
451
452
$ bundle exec centurion -p radio-radio -e staging -a list:running_container_tags
452
453
```
453
454
454
- ###List all the containers currently running for this project
455
+ ### List all the containers currently running for this project
455
456
456
457
Returns a (as yet not very nicely formatted) list of all the containers for
457
458
this project on each of the servers from the config.
@@ -460,13 +461,13 @@ this project on each of the servers from the config.
460
461
$ bundle exec centurion -p radio-radio -e staging -a list:running_containers
461
462
```
462
463
463
- ###List registry images
464
+ ### List registry images
464
465
465
466
Returns a list of all the images for this project in the registry.
466
467
467
- ```` bash
468
+ ``` bash
468
469
$ bundle exec centurion -p radio-radio -e staging -a list
469
- ````
470
+ ```
470
471
471
472
### Registry
472
473
@@ -609,4 +610,4 @@ patents, and ideas in that code in our products if we so choose. You also agree
609
610
the code is provided as-is and you provide no warranties as to its fitness or
610
611
correctness for any purpose
611
612
612
- Copyright (c) 2014-2016 New Relic, Inc. All rights reserved.
613
+ Copyright (c) 2014-2017 New Relic, Inc. All rights reserved.
0 commit comments