Code Monkey home page Code Monkey logo

terraform-cs-upcloud's Introduction

Deploying ComputeStacks on UpCloud

Create a terraform.tfvars file and adjust the settings appropriately. Specifically, you will:

  • Choose the appropriate package for your servers
    • NOTE: The packages set as the default in the terraform.tfvars.sample meet our minimum requirements. We do not recommend going below those, as that may prevent ComputeStacks from booting.
  • Specify how many nodes you want (we recommend 1, 3, or 5). If you need more resources, consider increasing the plan size, or creating multiple availability zones.
  • Choose your regions

Copy providers.tf.sample to providers.tf and adjust.

(Optional) Auto-configure DNS

You may wish to automatically configure your DNS records by using a terraform dns provider. Included here is an example file using CloudFlare, dns_cloudflare.tf.sample. You may copy that to dns_cloudflare.tf and adjust accordingly. You will also need to adjust your providers.tf file to include the CloudFlare modules.

By default, you will see the required DNS settings under result/.

Setup Terraform

Before proceeding, ensure you have terraform installed, and then run:

terraform init

Running Terraform

terraform apply

After terraform runs, you will see 2 newly created files under the result/ directory.

  1. dns_settings.txt | Your DNS settings, which must be applied prior to running the ansible package.
  2. inventory.yml | You will need this later when configuring Ansible.

Before Running Ansible

During the initial boot process of your new droplets, ansible will be installed. This can take a few minutes to complete.

Please ensure that this process has completed before running the ansible package. You can verify that this is completed by running: tail -f /var/log/syslog

You can also confirm the process has completed by ensuring which ansible is successful.

API Notes

Use these to determine values for the terraform configuration file.

  • Available plans: curl -u $UPCLOUD_USERNAME:$UPCLOUD_PASSWORD https://api.upcloud.com/1.3/plan
  • Available templates: curl -u $UPCLOUD_USERNAME:$UPCLOUD_PASSWORD https://api.upcloud.com/1.3/storage/template
  • Available Zones: curl -u $UPCLOUD_USERNAME:$UPCLOUD_PASSWORD https://api.upcloud.com/1.3/zone

Tip: Direnv

You can use direnv to safely store environmental variables locally in this directory. Once direnv is installed:

  1. mv .envrc.sample .envrc
  2. add your upcloud credentials, and;
  3. direnv allow ..

terraform-cs-upcloud's People

Contributors

kwatson avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.