GithubHelp home page GithubHelp logo

hartmans / industrial-algebra.carthage Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 14 KB

This is a Carthage layout I use to configure my laptop for development. This is pprovided as a sample of what Carthage is able to do. See https://github.com/hadron/carthage for the Carthage sources

Python 98.67% Mako 1.33%

industrial-algebra.carthage's Introduction

Sam's Laptop Configuration

This is a Carthage layout that I use to set up my laptop for Carthage and Other development. Chis is provided as an example Carthage layout and to illustrate the sorts of things that Carthage can do.

You probably cannot directly run this layout because it depends on hadron-operations, a Proprietary plugin that Hadron uses. The hadron-operations plugin is used only to install our internal software on the VMs that are intended for Hadron work. If that were commented out, the other containers should work fine just with the free software parts of Carthage.

How to Run

carthage-runner --config config.yml --keep-machines --no-tmux

What This Layout Provides

This layout will set up several containers in the local .algebra domain (the name of the hosting laptop is industrial-algebra):

  • dns.algebra: A local DNS and DHCP server
  • apt.algebra: A server for the local Debian mirror
  • hadron.algebra: A container with my employer's full development environment targeted on top of Debian bullseye
  • buster.algebra: A VM with the development environment for my employer on top of a Debian 10 operating system

How it Works

Most of the work of the plugin is in python/layout.py. We'll talk about the overall taxonomy in a bit, but to follow along, take a look there to start.

This layout depends on the following resources:

OurMachine
A MachineModel that we use as the base of all the machines in the layout. By inheriting from SystemdNetworkModelMixin, we indicate that Carthage should generate systemd-networkd condfiguration and arrange for that to be installed.
OurImage
A DebianContainerImage that is used as the default container image for any MachineModel realized as a container. This image has my ssh key authorized as part of building the image
BusterImage
A container image based on buster rather than bullseye.

The layout also provides two SystemDependencies: by default every machine depends on dns.algebra and apt.algebra.

The main layout is the class IaLayout (industrial algebra layout).

This layout is composed of two Enclaves (groupings of machines).

The suchdamage_enclave is an enclave for the real machines (the laptop).

The industrial_algebra machine model represents the laptop itself. Setting machine_implementation_key to LocalMachine means that Carthage should manage the local machine. In practice this means Carthage won't try to manage power and will use direct filesystem access to install files. Since this machine directly includes a NetworkConfig (NetworkConfigModel is a subclass of NetworkConfig), it will directly use the supplied network config.

The ia_enclave is where most of the real work is done. This enclave represents the containers and VMs on the system.

By default machine_implementation_key is set to Container, meaning that unless a machine overrides, Carthage will realize the machine with a systemd-nspawn container.

industrial-algebra.carthage's People

Contributors

hartmans avatar

Watchers

 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.