GithubHelp home page GithubHelp logo

turtlelabs / devops Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cloudspace-devops/devops

0.0 1.0 0.0 206 KB

Vagrant-based Virtualbox setup building packer images, go files, and docker containers.

License: MIT License

devops's Introduction

Vagrant-based Virtualbox setup building packer images, go files, and docker containers.

Usage

Be sure to install Virtualbox and Vagrant before you begin. If you haven't setup your machine for development, you can use our setup script for OSX at https://github.com/cloudspace-devops/dev-machine-setup

  1. Clone this repo into a folder inside your workspace: git clone [email protected]:cloudspace-devops/devops.git
  2. If you are going to be doing packer or go development, run the following in the root of your workspace directory:
  • git clone [email protected]:cloudspace-devops/packer-image-scripts.git
  • git clone [email protected]:cloudspace-devops/packer-shell-scripts.git
  • mkdir go; mkdir go/bin; mkdir go/pkg; mkdir go/src; mkdir go/src/github.com;
  1. If you are using a workspace other than /srv, update the $workspace variable inside the Vagrantfile to match your workspace location.
  2. Start the virtual machine by running vagrant up in the root of the project.
  3. SSH into your virtual machine by running vagrant ssh, also in the root of the project.

To test your development environment, do the following:

  1. Get a test project: go get github.com/cloudspace/microservice-url-lengthener-go
  2. Change directory into the project: cd /srv/go/src/github.com/cloudspace/microservice-url-lengthener-go/
  3. Remove the old lengthener binary: rm lengthener
  4. Build the go file without any dependencies: GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags '-w -s' lengthener.go
  5. Verify the binary is completely static (should show “not a dynamic executable”): ldd lengthener
  6. Build a a Docker image to run your binary: docker build -t cloudspace/url-lengthener .
  7. Test the Docker image you created: docker run -ti cloudspace/url-lengthener http://tinyurl.com/testurl

If all went well, this should return the lengthened url for the short url you passed in.

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.