diff --git a/openstack/README.md b/openstack/README.md new file mode 100644 index 0000000..6c7c66b --- /dev/null +++ b/openstack/README.md @@ -0,0 +1,239 @@ +📙 **Disclaimer: Community supported repository. Not supported by Mesosphere directly.** + +# Open DC/OS on OpenStack with Terraform + +## Things to Know + +The current implemenetation ... + +* Does setup a working DC/OS cluster on OpenStack +* Does not setup or use OpenStack load balancers +* Does apply floating IPs on the bootstrap and master nodes +* Does create separate security groups for bootstrap, master, public agent, and private agent. Currently, all the security groups are the same and very open. +* Does not use OpenStack compute server groups. Should we? +* Does use cloud init to partially provision servers and not via remote ssh execution +* Has been tested with CoreOS +* Has not been tested with CentOS +* Defaults to static DC/OS master discovery +* Has not been tested with exhibitor + +Was tested with OpenStack Mirantis for DC/OS version 1.11. + +## Getting Started + +### Configure your Cloud Provider Credentials + +[Source your OpenStack RC file](https://docs.openstack.org/zh_CN/user-guide/common/cli-set-environment-variables-using-openstack-rc.html) and activate it by running the shell script. + +### Pull down the DC/OS terraform scripts below + +There is a module called `dcos-tested-openstack-oses` that contains all the tested scripts per operating system. The deployment strategy is based on a bare image coupled with a prereq `script.sh` to get it ready to install dcos-core components. + +OS | Version | Tested +---|---------|------- +CoreOS | 1576.4.0 | Yes + +NOTE: The default value for the variable `os` is `coreos`. + +### Quick Start + +We've provided sensible defaults that you would want to play around with DC/OS for setting up DC/OS. The default will setup a multi-master deployment. Three agents will be deployed for you. Two private agents, one public agent. + +There are several OpenStack related [variables](/openstack/variables.tf) that must be provided because these are unique to the OpenStack install that is being used: + +* `master_instance_flavor` +* `bootstrap_instance_flavor` +* `private_agent_instance_flavor` +* `public_agent_instance_flavor` +* `os_floating_ip_pool` +* `os_image_name` +* `os_external_network_id` + +You can create a [tfvars file](https://www.terraform.io/intro/getting-started/variables.html) to store the appropriate values for the required variables above. Assume that your tfvars file is called `desired_cluster_profile.tfvars`. + +- There is no git clone of this repo required. Terraform does this for you under the hood. + +_*Note:* Create a new directory before the command below as terraform will write its files within the current directory._ + +```bash +mkdir dcos-installer +cd dcos-installer +terraform init -from-module github.com/dcos/terraform-dcos//openstack +terraform apply -var-file desired_cluster_profile.tfvars +``` + +#### Advance YAML Configuration + +We have designed this project to be flexible. Here are the example working variables that allows very deep customization by using a single `tfvars` file. + +For advance users with stringent requirements, here are the DC/OS flags examples where you can simply paste your YAML configuration in your desired_cluster_profile.tfvars. The alternative to YAML is to convert it to JSON. + +```bash +$ cat desired_cluster_profile.tfvars +dcos_version = "1.10.2" +os = "centos_7.3" +num_of_masters = "3" +num_of_private_agents = "2" +num_of_public_agents = "1" +expiration = "6h" +dcos_security = "permissive" +dcos_cluster_docker_credentials_enabled = "true" +dcos_cluster_docker_credentials_write_to_etc = "true" +dcos_cluster_docker_credentials_dcos_owned = "false" +dcos_cluster_docker_registry_url = "https://index.docker.io" +dcos_use_proxy = "yes" +dcos_http_proxy = "example.com" +dcos_https_proxy = "example.com" +dcos_no_proxy = <