Giter VIP home page Giter VIP logo

gemini-infra's Introduction

♊ Gemini: Internal Services Cluster

Gemini Constellation

Image credit: Till Credner, CC BY-SA 3.0

Serokell's internal services.

All AWS resources are managed by Terraform. Machine configuration is managed with Nix, and all machines run NixOS.

All necessary programs and dependencies are provided by Nix in nix-shell or nix develop.

Repository layout

  • ./terraform contains terraform expressions used to deploy all EC2 servers and Route53 zones&records for tezos.serokell.team and tezosagora.org

  • ./common.nix provides common NixOS configuration defaults for all servers

  • ./modules contains NixOS modules that aren't used outside the repo but could still be reused some day

  • ./servers contains NixOS server descriptions. Usually just imports a profile and changes the default values to specific ones

  • ./flake.nix defines repository dependencies, passes them down to servers and builds the final NixOS systems to be deployed. Also defines a devShell containing packages used to deploy this repo and a deploy attribute which describes how to deploy NixOS systems to servers.

  • ./flake.lock is a lockfile containing dependency pins (git revisions)

  • ./default.nix and ./shell.nix are for pre-flake nix compatibility.

Servers

Name Function IP
Alhena Hermetic
Alzirr Swampwalk/TT 135.181.78.88
Castor EDNA Staging
Jishui EDNA Demo
Mebsuta vpn.serokell.net
Tejat Prior Mumble + tzbot
Wasat Old Wireguard server

Deployment

Terraform

Cloud hardware required to run this repository is described using Terraform. Terraform is an Infrastructure as Code tool from Hashicorp. Read more here.

Terraform version that is used in this repo is pinned. Please use nix-shell or nix develop to get it.

Terraform resources are declared in terraform/.

The first time you use it, you need to run terraform init in that directory. This will initialize local state and download any missing plugins.

Your main workhorse will be terraform apply, which will print a diff view of any resource changes, and ask you whether you want to commit them. Please read this output carefully, as Terraform will not hesitate to nuke anything it thinks needs nuking.

NixOS

Server configurations are described in ./servers.

To deploy all the servers, enter a shell (with nix develop or nix-shell) and run deploy.

You may wish to read deploy --help to understand how to use the tool.

Secrets

Secrets are stored in Vault. Serokell employees with Admin-level access need to generate approle credentials and push them to servers in order for services to work after redeployment. Example of how to do so:

$ # Enter a shell with dependencies and variables set
$ nix develop # or nix-shell
$ # Authenticate to vault
$ vault login # You may need to specify the login method
$ # Generate and push approles with accompanying security policies to Vault
$ vault-push-approles
<interaction omitted>
$ # Fetch approle credentials from Vault and push them to the server
$ vault-push-approle-envs
<interaction omitted>

gemini-infra's People

Contributors

rvem avatar balsoft avatar zhenyavinogradov avatar notgne2 avatar sereja313 avatar serokell-bot avatar cab404 avatar mkaito avatar karandit avatar magicrb avatar worm2fed avatar gromakovsky avatar serokellcao avatar dcastro avatar dk318 avatar philtaken avatar pasqu4le avatar krendelhoff2 avatar int-index avatar dmozhevitin avatar heimdell avatar

Stargazers

Owen avatar Britton Robitzsch avatar Andrew Shebanow avatar M32 avatar Shijia Zhang avatar Fang-Pen Lin avatar Ernad Husremović avatar Wong Heung Sang avatar  avatar  avatar dunxen avatar Igor Shegolev avatar 45739847 avatar  avatar

Watchers

Maxim Koltsov avatar GillesMadi avatar James Cloos avatar  avatar Ruben Astudillo avatar Levon Oganyan avatar Aleksei Khachiiants avatar  avatar Iurii Kravchenko avatar  avatar Dmitri avatar Daniel Rogozin avatar  avatar

Forkers

magicrb dk318

gemini-infra's Issues

Failed to automatically update flake.lock

I tried updating flake.lock, but failed:

Error during repository initialisation: Error fetching default branch for existing repository: invalid version 0 on git_proxy_options; class=Invalid (3)

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.