GithubHelp home page GithubHelp logo

linuxus / terraform-kubernetes Goto Github PK

View Code? Open in Web Editor NEW

This project forked from v1k0d3n/terraform-kubernetes

0.0 2.0 0.0 140 KB

A Terraform Kubernetes Openstack testing lab using Fedora (master) and Atomic (nodes)

HCL 93.71% Shell 6.29%

terraform-kubernetes's Introduction

Terraform Openstack Kubernetes Deployment using Fedora and Atomic

This Terraform deployment will allow you to deploy Kubernetes on agentless Fedora/Atomic hosts and very little prep-work.

Devices Created with this Terraform deployment:


Devices:

  • 1 Fedora Host - Kubemaster (10.8.80.10/24)
  • 5 Atomic Hosts - Kubenode01-05 (10.8.80.11-15/24)

Key-pair:

  • terraform-key

Router:

  • CIDR - 10.8.80.0/24

Security Rules:

  • kubelab-default - ICMP (192.168.0.0/16), SSH (any)
  • kubelab-kubernetes - 2379 (any), 4001 (any), 8001 (any), 8080 (any)
  • kubelab-kube-mgnt - 8000 (192.168.0.0/16), 9090 (192.168.0.0/16)
  • kubelab-nodeport-tests - 31234, 31235, 31248, 31249, 31250

Tools:

  • TCP Port 9090 will present you with the Fedora Kubemaster Cockpit interface. Use this for management. User/fedora Pass/changeme
  • TCP Port 8000 is a container I started so you can review any of the information reported into etcd (via etcd-browser).
  • Guestbook is included under kubelab/jinkit-demo/kube/demo/guestbook. You can simply run ./guest_up.sh to bring up the working guestbook over TCP port 31234 (using nodeport).
  • Most recent Kubernetes repo is downloaded under /home/fedora/github/ so that you can run other tests.

Instructions:

Read through the variables.tf file to configure the environment to your specific needs. In reality, that is all that's needed as far as configuring Terraform, unless you want to change the firewall rules etc. In that case, use this repo as a template for your own needs.

Step 1: Create an ssh key-pair called "terraform/terraform.pub". Be aware that changing this may require you to modify the Terraform deployment a little.

Step 2: Install Terraform from http://terraform.io.

Step 3: Install the openstack command-line clients as outlined on Openstack's Documentation.

Step 4: Download your Openstack openrc.sh file as directed from Openstack's Documentation. Download it to the root of this Terraform repository, and run it (./-openrc.sh).

Step 5: Edit the variables.tf file located at the root of this repository to match your environment. While you're doing this, download the required images as instructed in Step 6.

Step 6: Download the two images required for this deployment.

Load these images into your Openstack Environment via Glance.

Step 7:

  • Run terraform plan: Plan out your deployment and review any changes before deployment.
  • Run terraform apply: To run the deployment (it will take a couple of minutes to complete).
  • Run terraform destroy: To collapes (destroy) the environment after your testing.

Notes: Once the lab build is completed, you will be presented with the host IP addresses (from your configured floating range).

Questions:

Please let me know if you run into any issues, or have ideas on how to improve this. This lab will become a quick-deployment testing playground, and I will add other testing methods over time.

v1k0d3n

terraform-kubernetes's People

Contributors

v1k0d3n avatar

Watchers

James Cloos avatar Abdi Ibrahim 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.