Coder Social home page Coder Social logo

operatorinc / terraform-plans Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 12 KB

Terraform plans for Operator Inc. These plans are presented during Operator Day. Read more about the Juju provider for Terraform at: https://registry.terraform.io/providers/juju/juju/latest

Home Page: https://juju.is/operator-day

HCL 100.00%
charms juju terrraform charmed-operator devops iac iac-terraform operator k8s-operator

terraform-plans's Introduction

To deploy on MicroK8s, you'll need:

  • Juju 3 installed.
  • A Juju controller created.

For more information about how to install Juju, see Get started with Juju.

Make sure you have the following plugins enabled:

sudo microk8s enable dns storage ingress
IPADDR=$(ip -4 -j route get 2.2.2.2 | jq -r '.[] | .prefsrc')
sudo microk8s enable metallb:$IPADDR-$IPADDR

There are three environments defined here. To deploy development, assuming you've done the above:

cd zinc/environments/dev
terraform init
terraform plan
terraform apply

To inspect the environment with Juju, run:

juju switch dev-zinc
juju status

Then to test the service, run:

curl -v http://dev.operatorinc.org/dev-zinc-zinc/ui/ --resolve dev.operatorinc.org:80:${IPADDR}

If you want to visit the service in a browser, add the value of $IPADDR from above to your /etc/hosts file, and then browse to the URL above. You can login with the 'admin' user ID using the password retrieved by running:

juju run zinc/0 get-admin-password --wait 1m

To deploy the staging or production environment, you'll need to define some environment variables. This could be done by creating a file and sourcing it (e.g. named '.terraform-secrets', which will be ignored by git, which is what you since it will contain secrets).

export [email protected]
# The AWS credentials will need to be associated with an account
# that has access to request TLS certificates via Route53 for the
# domain specified as 'external_hostname' on the acme charm.
export TF_VAR_aws_access_key_id=blah
export TF_VAR_aws_secret_access_key=blah
export TF_VAR_kratos_microsoft_tenant_id=blah
export TF_VAR_kratos_client_secret=blah

In a production setting, these would likely come from a Vault instance.

terraform-plans's People

Contributors

mthaddon avatar

Stargazers

 avatar  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.