Git Product home page Git Product logo

vyos-prod's Introduction

My VyOS IaC configuration

Forked from Budimanjojo VyOS Config

📖  Overview

This repository contains my VyOS configuration in a declarative state. Everything I have here can be applied to the machine by running apply-config.sh script in the machine.

📥  Quickstart

After installing VyOS in your machine, setup your LAN and WAN interface and make sure it can talk to the internet. Something like this may do:

configure
set interfaces ethernet eth0 address dhcp
set interfaces ethernet eth1 address 192.168.10.1/24
set system name-server 1.1.1.1
commit

Once you're done, connect your workstation to the eth1 and set a static IP in the 192.168.10.1/24 range. Then you can run bootstrap.sh and follow the instruction on your screen:

bash <(curl -s https://raw.githubusercontent.com/trosvald/vyos-prod/main/bootstrap.sh)

The bootstrap script will:

  1. Generate SSH keypair in /config/secrets.
  2. Enable SSH access to itself.
  3. Print the scp command to send age secret key into /config/secrets and getting the generated public key.
  4. Pulling your repository into /config directory.
  5. Generate container config files inside containers directory if they have .bootstrap.tmpl extension with secrets substituted.
  6. Pull container images needed for bootstrap process.
  7. Applying set commands inside bootstrap directory.

After bootstrapping, you don't need to run it anymore although it should be pretty idempotent.

⚙️  Chore

Everytime you want to change something, do it inside /config directory and then run apply-config.sh with -c flag. Don't forget to push the changes to your remote repository too. This will ensure the state of this repository to be the same as the machine configuration.

🤝  Thanks

A lot of inspiration in this repository came from:

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.