Coder Social home page Coder Social logo

ant1off / puppet-control-repo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from erlendf/puppet-control-repo

0.0 0.0 0.0 398 KB

Puppet Control Repo for automatic deployment of a Golang API with PostgreSQL for persistant storage

License: Apache License 2.0

Ruby 39.61% Puppet 53.88% Shell 4.85% Pascal 1.66%

puppet-control-repo's Introduction

Puppet Control Repo

This is project developed for our Infrastructure as Code project. It automates the deployment of a Golang REST API, which uses a PostgreSQL database. Changes to the Golang repository triggers automatic rebuilds and redeploys the API. It uses this example Golang REST API to demonstrate connectivity, aswell as read and write access to the database. This can be changed in Hiera.

The repository automatically used by IaC-Heat on deployment.

The project is based on this puppet control repo by Erik Hjelmås, which in turn is based on this puppet control repo template by puppetlabs.

Brief structure

Each of the nodes are assigned a role (see manifests/site.pp). Each role consists of several profiles which provide various functionality.

A Telegraf, InfluxDB, Grafana stack is used for monitoring.

Testing

For unit testing we use rspec-puppet. For acceptance testing we use Serverspec.

Unit testing

To run the unit tests, simply cd into site-modules/profile/ and run rake.

cd site-module/profile
rake spec

Acceptance testing

To run the acceptance tests you will have to add some lines to your ssh configuration file.

vi ~/.ssh/config

And add the following (note that the Host-field should match the hosts variable in the Rakefile):

Host balancer01.iac
     HostName <ip to machine>
     User ubuntu
     Port 22
     IdentityFile <path to private key>
Host database01.iac
     HostName <ip to machine>
     User ubuntu
     Port 22
     IdentityFile <path to private key>
Host frontend00.iac
     HostName <ip to machine>
     User ubuntu
     Port 22     
     IdentityFile <path to private key>

When the ssh-config is ready, simply cd into the root directory of the control repo and run rake.

rake spec

Authors

Johan Selnes, Aksel Baardsen, Erlend Fonnes

During the project, we used Vscode liveshare, which is why Johan likely has the majority of our commits.

puppet-control-repo's People

Contributors

ant1off avatar npwalker avatar akselba avatar erlendf avatar natemccurdy avatar reidmv avatar githubgossin avatar aharden avatar whatsaranjit avatar sshastri avatar stjeanp avatar binford2k avatar mtsprout avatar fvoges avatar igalic avatar cvquesty avatar jdesroch avatar petems avatar pjmorr avatar abuxton 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.