From 684e439f8f3e42706c645e09cbef82f581a40d0b Mon Sep 17 00:00:00 2001 From: Margaret Sy Date: Fri, 20 Oct 2017 10:56:14 -0700 Subject: [PATCH 1/3] add documentation about rollback protection and links to related wiki docs --- README.md | 4 +++ dcos_launch/README.md | 29 +++++++++++++++++++ dcos_launch/sample_configs/README.md | 1 + .../sample_configs/aws-zen-cf-govcloud.yaml | 20 +++++++++++++ 4 files changed, 54 insertions(+) create mode 100644 dcos_launch/sample_configs/aws-zen-cf-govcloud.yaml diff --git a/README.md b/README.md index df654d2e..bac9edc5 100644 --- a/README.md +++ b/README.md @@ -57,3 +57,7 @@ Simply run `tox` and the following will be executed: * pyinstaller for packaging dcos-launch Note: these can be triggered individually by supplying the `-e` option to `tox` + +### More docs +- [User guide](./dcos_launch/README.md) +- [Config docs and examples](./dcos_launch/sample_configs/README.md) \ No newline at end of file diff --git a/dcos_launch/README.md b/dcos_launch/README.md index 0538bb70..1a72dd6d 100644 --- a/dcos_launch/README.md +++ b/dcos_launch/README.md @@ -48,3 +48,32 @@ Log level. By default, the log level is info. By using this option you will also ### `-e LIST` Custom environment variables to include. This option allows passing through environment variables from the current environment into the testing environment. The list is comma delimited and any provided environment variables will override the automatically injected ones. Required variables that are automatically injected include `MASTER_HOSTS`, `SLAVE_HOSTS`, `PUBLIC_MASTER_HOSTS`, `PUBLIC_SLAVE_HOSTS`, `DCOS_DNS_ADDRESS`. E.g. `dcos-launch pytest -e MASTER_HOSTS -- test_composition.py`, `ENABLE_RESILIENCY_TESTS=true dcos-launch pytest -e ENABLE_RESILIENCY_TESTS,MASTER_HOSTS -- test_applications.py` + +## FAQ + +### How can I keep my cluster from being deleted? + +By default the AWS-managed clusters will be garbage-collected after 2 hours. You can extend the cluster's life through [CCM](https://ccm.mesosphere.com), but if for some reason this isn't working, you need to enable termination protection manually. + +If you know in advance that you want to completely disable cluster termination, you can set the `disable_rollback` parameter in your config file to `true`. + +If you have already launched a cluster without rollback protection, you can enable the protection manually. + +1. Log into the AWS console through [OneLogin](https://mesosphere.onelogin.com) +2. Go to the CloudFormation console and search for your cluster. The Stack Name will be what you provided for `deployment_name` in the launch config. +3. Click on the stack to view its Stack Detail page. In the upper right hand corner there should be a dropdown button for `Other Actions`. Select `Change termination protection` and enable termination protection. + + +***Don't forget to delete your cluster!*** + +If you have enabled termination protection, when you are done with your cluster, disable the termination protection again and then delete it through `dcos-launch delete` or manually through the CloudFormation console + +### Can I stop a TeamCity cluster from being deleted? + +At this time you cannot prevent TeamCity from deleting a cluster. + +### More docs + +- [Accessing TeamCity Provided Clusters](https://wiki.mesosphere.com/display/DCOS/Accessing+Teamcity+Provided+Clusters) +- [Running Integration Tests](https://wiki.mesosphere.com/display/DCOS/Integration+Tests) +- [Debugging Integration Tests](https://wiki.mesosphere.com/display/DCOS/Accessing+Teamcity+Provided+Clusters) diff --git a/dcos_launch/sample_configs/README.md b/dcos_launch/sample_configs/README.md index 8879fe9a..dd1faf17 100644 --- a/dcos_launch/sample_configs/README.md +++ b/dcos_launch/sample_configs/README.md @@ -35,6 +35,7 @@ _Note_: DC/OS deployed from aws or azure provider do not technically need `ssh_u ### Options * `key_helper`: generate private SSH keys for the underlying hosts if `true`. In `platform: aws`, this means the user does not have to supply `KeyName` in the template parameters and dcos-launch will fill it in. Similarly, in `platform: azure`, `sshRSAPublicKey` is populated automatically. In the aws case, this key will be deleted from EC2 when the deployment is deleted with dcos-launch * `zen_helper`: only to be used with `provider: aws` and zen templates. If `true`, then the network prerequisites for launching a zen cluster will be provided if missing. The resources potentially covered are: Vpc, InternetGateway, PrivateSubnet, and PublicSubnet. As with `key_helper`, these resources will be deleted if dcos-launch is used for destroying the deployment +* `disable_rollback` (for AWS clusters): (`true` or `false`) This is false by default if omitted. Disabling rollback will prevent your cluster from being garbage-collected, so make sure you delete it when you are done. See [here](../README.md) for instructions on how to delete the cluster if you have enabled rollback protection. ### Support * `onprem` can only be provisioned via `aws` platform diff --git a/dcos_launch/sample_configs/aws-zen-cf-govcloud.yaml b/dcos_launch/sample_configs/aws-zen-cf-govcloud.yaml new file mode 100644 index 00000000..cc946b06 --- /dev/null +++ b/dcos_launch/sample_configs/aws-zen-cf-govcloud.yaml @@ -0,0 +1,20 @@ +--- +launch_config_version: 1 +deployment_name: msy-20171017-1327-zen +template_url: https://s3-us-gov-west-1.amazonaws.com/govcloud.downloads.dcos.io/dcos/testing/margaret/pull/1544/permissive/ee.el7-zen-1.json +provider: aws +aws_region: us-gov-west-1 +key_helper: true +zen_helper: true +template_parameters: + AdminLocation: 0.0.0.0/0 + PublicAgentInstanceCount: 1 + PrivateAgentInstanceCount: 2 + PublicAgentInstanceType: m4.large + PrivateAgentInstanceType: m4.large + MasterInstanceType: m4.large + InternetGateway: igw-32ac6157 + Vpc: vpc-3cfa0359 + PublicSubnet: subnet-0530bf60 + PrivateSubnet: subnet-2930bf4c +ssh_user: centos \ No newline at end of file From 8277070acde1dfa0c6f79ddf76699b36811ceab7 Mon Sep 17 00:00:00 2001 From: Margaret Sy Date: Fri, 20 Oct 2017 11:04:54 -0700 Subject: [PATCH 2/3] delete file that was accidentally added --- .../sample_configs/aws-zen-cf-govcloud.yaml | 20 ------------------- 1 file changed, 20 deletions(-) delete mode 100644 dcos_launch/sample_configs/aws-zen-cf-govcloud.yaml diff --git a/dcos_launch/sample_configs/aws-zen-cf-govcloud.yaml b/dcos_launch/sample_configs/aws-zen-cf-govcloud.yaml deleted file mode 100644 index cc946b06..00000000 --- a/dcos_launch/sample_configs/aws-zen-cf-govcloud.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -launch_config_version: 1 -deployment_name: msy-20171017-1327-zen -template_url: https://s3-us-gov-west-1.amazonaws.com/govcloud.downloads.dcos.io/dcos/testing/margaret/pull/1544/permissive/ee.el7-zen-1.json -provider: aws -aws_region: us-gov-west-1 -key_helper: true -zen_helper: true -template_parameters: - AdminLocation: 0.0.0.0/0 - PublicAgentInstanceCount: 1 - PrivateAgentInstanceCount: 2 - PublicAgentInstanceType: m4.large - PrivateAgentInstanceType: m4.large - MasterInstanceType: m4.large - InternetGateway: igw-32ac6157 - Vpc: vpc-3cfa0359 - PublicSubnet: subnet-0530bf60 - PrivateSubnet: subnet-2930bf4c -ssh_user: centos \ No newline at end of file From 2514804e98f3d256191678e984cfcb4c7d018e83 Mon Sep 17 00:00:00 2001 From: Margaret Sy Date: Tue, 24 Oct 2017 10:09:10 -0700 Subject: [PATCH 3/3] remove links to internal wiki documentation --- dcos_launch/README.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/dcos_launch/README.md b/dcos_launch/README.md index 1a72dd6d..ec272b07 100644 --- a/dcos_launch/README.md +++ b/dcos_launch/README.md @@ -71,9 +71,3 @@ If you have enabled termination protection, when you are done with your cluster, ### Can I stop a TeamCity cluster from being deleted? At this time you cannot prevent TeamCity from deleting a cluster. - -### More docs - -- [Accessing TeamCity Provided Clusters](https://wiki.mesosphere.com/display/DCOS/Accessing+Teamcity+Provided+Clusters) -- [Running Integration Tests](https://wiki.mesosphere.com/display/DCOS/Integration+Tests) -- [Debugging Integration Tests](https://wiki.mesosphere.com/display/DCOS/Accessing+Teamcity+Provided+Clusters)