Git Product home page Git Product logo

chef_go_sample's Introduction

Introduction

Very basic set of scripts to deploy a sample go program over SSH using Chef and sh scripts.

Idea

On local node:

  1. Deploy the content of the app folder to the destination node using SSH
  2. Remotely execute the install.sh script on the destination node

In the install.sh script:

  1. Install required packages to execute Chef cookbooks
  2. Execute the default.rb Chef cookbook using chef-solo

In the default.rb cookbook:

  1. Install packages required to run the sample go program
  2. Execute the sample go program sample.go

Prerequisites

  1. SSH keys set up so that ssh [email protected] opens the ssh session without prompting for password (use ssh-agent if you want to keys with password)
  2. Git installed on the host (from which the scripts are deployed to the destination node)

Usage

curl -s https://raw.githubusercontent.com/amiramix/chef_go_sample/master/init.sh | sh -s [email protected]

Where [email protected] is the node on which the sample program should be installed and started

Limitations

Scripts have been developed and tested on a base FreeBSD server (without any ports or packages installed):

  1. They don't use sudo, which is not present in the base. Installing and configuring sudo in addition to this sample program would be an easy, but unnecessary addition considering the purpose of this example.
  2. Because of the same reason, some commands may not work as expected in GNU versions of those commands on Linux servers.

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.