-
Notifications
You must be signed in to change notification settings - Fork 5
Created auto-scaling group within tutorial #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6f53193
a39967a
4cd22bc
509f379
0796b5f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
Fleet allows you to easily manage your auto-scaling group whereby you can set a min/max of servers for a particular environment. | ||
|
||
When you describe an environment you can see min/max server pool limits in place as well as how many frontends a particular release is currently running: | ||
```bash | ||
$ fleet env describe prod | ||
---------------- ------------------------- | ||
name prod | ||
status RUNNING | ||
whitelist allow-all | ||
ssl certificate prod | ||
created 2015-03-24 23:06:21+00:00 | ||
updated 2015-06-30 05:53:09+00:00 | ||
recycling ON | ||
tracked branches fleet-deploy | ||
previous release | ||
'autoscaling min 2' | ||
'autoscaling max 4' | ||
---------------- ------------------------- | ||
|
||
Releases: | ||
name status loaded updated 'frontends' | ||
------- ---------- ------------------------- ------------------------- ----------- | ||
037205f * ACTIVE * 2015-06-30 05:37:51+00:00 2015-06-30 05:44:22+00:00 '2' | ||
|
||
Endpoints: | ||
-------- ------------------------------ | ||
admin admin.prod.ancora.f.nchr.io | ||
adminssh adminssh.prod.ancora.f.nchr.io | ||
www www.prod.ancora.f.nchr.io | ||
-------- ------------------------------ | ||
``` | ||
|
||
## Limits | ||
|
||
In the event that you need to serve more traffic you can simply expand your server pool 'limits' from 2/4 (min/max) to say 4/10 servers like so: | ||
|
||
```bash | ||
$ fleet env autoscaling limits prod 4 10 | ||
``` | ||
|
||
There are resources limits in place on your Fleet account for the total number of instances you can run. At any point you see for yourself how many instances you are running and what the current max amount is set to by running: | ||
|
||
```bash | ||
$ fleet limits | ||
|
||
name current max | ||
--------- --------- ----- | ||
instances 16 60 | ||
``` | ||
|
||
## Desired | ||
|
||
You have the option rather than waiting for your infrastructure to elastically scale you can explicitly set the 'desired' amount of servers you want in place. In this example increasing it to six (6) for production: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "You have the option rather than waiting for your infrastructure to elastically scale you can explicitly set the 'desired' amount of servers..." doesn't read right. "You have the option rather than waiting for your infrastructure to elastically scale to explicitly set the 'desired' number of servers..." would work better. Or possibly: |
||
|
||
```bash | ||
$ fleet env autoscaling desired prod 6 | ||
``` | ||
|
||
## Recycling | ||
|
||
Within each environment you have the option to turn 'ON' instance recycling which in the event that any frontend node fails a health check it will be recycled. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Possibly missing a few words? |
||
|
||
```bash | ||
$ fleet env prod recycling ON | ||
$ fleet env describe prod | ||
---------------- ------------------------- | ||
name prod | ||
status RUNNING | ||
whitelist allow-all | ||
ssl certificate prod | ||
created 2015-03-24 23:06:21+00:00 | ||
updated 2015-07-02 04:29:25+00:00 | ||
recycling 'ON' | ||
tracked branches fleet-deploy | ||
previous release | ||
autoscaling min 2 | ||
autoscaling max 4 | ||
---------------- ------------------------- | ||
|
||
Releases: | ||
name status loaded updated frontends | ||
------- ---------- ------------------------- ------------------------- ----------- | ||
8ef9d2f * ACTIVE * 2015-06-09 01:50:25+00:00 2015-06-29 05:07:55+00:00 2 | ||
|
||
Endpoints: | ||
-------- ------------------------------ | ||
admin admin.prod.ancora.f.nchr.io | ||
adminssh adminssh.prod.ancora.f.nchr.io | ||
www www.prod.ancora.f.nchr.io | ||
-------- ------------------------------ | ||
``` | ||
|
||
We have a standard health check script stored on your frontends which for reference can be viewed on the admin node: | ||
|
||
```bash | ||
|
||
$ ssh deploy@adminssh.prod.ancora.f.nchr.io | ||
$ cat health-checks/fleet-health-check.php | ||
|
||
<?php | ||
|
||
require('../app/public/app/Mage.php'); | ||
|
||
// Initialise Magento | ||
Mage::app(); | ||
|
||
// Get a random value for tests | ||
$rand = rand(); | ||
|
||
// Test database works | ||
$product_id = Mage::getModel('catalog/product')->getCollection()->getAllIds(1); | ||
|
||
// Test cache works | ||
$cache = Mage::app()->getCacheInstance(); | ||
$cache->save($rand,'heathcheck',array(),5); | ||
assert($cache->load('heathcheck') == $rand); | ||
$cache->remove('healthcheck'); | ||
|
||
// Test sessions work | ||
$session = Mage::getSingleton('core/session'); | ||
$session->setData('healthcheck',$rand); | ||
assert($session->getData('healthcheck') == $rand); | ||
$session->clear(); | ||
|
||
echo 'OK'; | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resources -> resource (no plural needed there)
"At any point you see for yourself how many instances you are running and what the current max amount is set to by running"
Missing word? "At any point you can see for yourself"
Also, better to use number rather than amount for instances.