Giter VIP home page Giter VIP logo

acm-aws's Introduction

acm-aws

Deployment status badge

acm-aws contains the Terraform deployment files for acmCSUF. It uses Terraform and Nix to orchestrate cloud servers.

What is?

Terraform

Terraform is a tool that allows us to declare infrastructure as code (IaC). In other words, it allows us to declare what we want cloud providers (e.g. AWS) to do for us in code without having to touch buttons.

The entire process of orchestrating cloud servers is automated using this tool, and any changes are done on these version-controlled text files, not any UI.

Nix

Nix (used here) is a declarative package manager. Unlike any traditional package manager, Nix is used as a programming language capable of reproducing package builds in a sane manner with everything written in files.

Similarly to Terraform, Nix's input files will help us manage the servers in a more automatic fashion by allowing us to declare what we want on the servers and have everything else handled automatically.

Project Structure

acm-aws has several root directories:

  • nix/ contains internal Nix files, such as the sources for some of our packages.
  • packages/ contains our own Nix package files.
  • scripts/ contains utility scripts. See the "Quick Tasks" section.
  • secrets/ contains deployment secrets such as tokens. This should never be pushed decrypted.
  • servers/ contains all the files that define servers.
    • servers/base.nix is the base Nix server declaration.
    • servers/cirno/* contains the files for just the cirno server.
  • main.tf declares the root Terraform module. Applying this file will deploy all of our servers.

Setting Up

You need Terraform, Nix and git-crypt to develop and deploy. It's most recommended if you have nix-shell.

For instructions on how to install Nix, see Nix > Download. It should just be one command.

To set up git-crypt, run:

git-crypt init

Afterwards, initialize the local Terraform workspace:

terraform init

Deploying

Run:

terraform apply

Quick Tasks

The sections underneath describe small tasks that may be useful in certain scenarios.

SSH

# Example: ./scripts/ssh <server name>

./scripts/ssh cirno

Obtaining an IP Address

# Example: ./scripts/ip <server name>

ip=$(./scripts/ip cirno)
curl -v ${ip}:80

Updating a Dependency

# Example: ./scripts/update-pkg <package name>

./scripts/update-pkg acmregister

acm-aws's People

Contributors

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