Git Product home page Git Product logo

on-dev's Introduction

SUMMARY

This repository is a down-stream, personal test environment, I use for my contributions to the RackHD project.

It leverages the Vagrant Virtual machine I delivered to this group. The original project is used for demonstrating the basic functionality of the RachHD bare-metal deployments by quickly orchestrating a simple RackHD management server and n number of PXE clients, complete with virtual networking under a VirtualBox environment.

If you are interested in the RackHD project and would like to learn more, visit our github page here: https://github.com/RackHD/RackHD where you can find contact information and access to our slack community!

This is freely available for anyone to use and I will be updating it as my needs change.

UPDATES

Warning: At this time windows does not support the ability to create a shared directory between the host and the Monorail server. We discovered issues when attempting dependency installation, there appears to be a known issue.

http://blog.prolificinteractive.com/2015/01/21/getting-vagrant-nodejs-windows-play-well-together/

https://harvsworld.com/2015/how-to-fix-npm-install-errors-on-vagrant-on-windows-because-the-paths-are-too-long/

Attempts have been made to implement fixes suggested, but was unable to resolve the errors.

UBUNTU / LINUX / MAC SETUP

Install the latest Vagrant & Virtual Box programs onto your host. (we expect at least Vagrant 1.8.1 and Virtual Box 5.0)

https://www.vagrantup.com/downloads.html

https://www.virtualbox.org/wiki/Downloads

Clone RackHD repo to your local git directory.

$ cd /<pathToYourWorkSpace>/
$ git clone https://github.com/DavidjohnBlodgett/on-dev.git

Enter the build directory and create a new config.

$ cd on-dev/build/
$ cp config/monorail_rack.cfg.example config/monorail_rack.cfg

Note: Edits can be made to this new file to adjust the number of pxe clients created.

Enter the /bin folder that holds the batch script

$ cd bin/
$ monorail_rack

Note: This will import into Virtual box a monorail server VM and some number of PXE clients.

WINDOWS SETUP

Install the latest Vagrant & Virtual Box programs onto your host. (we expect at least Vagrant 1.8.1 and Virtual Box 5.0)

https://www.vagrantup.com/downloads.html

https://www.virtualbox.org/wiki/Downloads

Git clone the on-dev repo onto your system.

$ cd /<pathToYourWorkSpace>/
$ git clone https://github.com/DavidjohnBlodgett/on-dev.git

Enter the build directory & /bin folder that holds the batch script (this will import into Virtual box a monorail server VM and some number of PXE clients).

$ cd on-dev/build/bin

Execute the monorail_rack setup.

$ monorail_rack.bat

Note: To change the number of PXE clients created at runtime, edit the monorail_rack.bat script and change the value for pxe_count.

Ssh into the monorail server.

$ vagrant ssh dev_windows

Remove existing "demo" repositories.

$ rm -rf /home/vagrant/src/*

Continue to the next section.

Note: You will need to remain on the monorail server and ignore references to installing anything from the host's perspective. In addition, any references to "dev" are to be replaced with "dev_windows"

GIT FORK & GIT CLONE REPOSITORIES

For a Mac or Linux enviorment,the monorail server currently mounts your workspace directory found on your host to the /home/vagrant/src directory on the VM.

/home/<user>/<pathToYourWorkSpace>/ == /home/vagrant/src

It is expected that this is the same directory you have downloaded the on-dev repository.

This being said, it is currently a manual process to place the expected monorail repositories within your workspace, so they will be reflected correctly inside the Virtual Machine.

The goal of this section is to provide a clear basic explanation of each step needed to set up your git repositories with a common workflow.

1.Git fork each repository to your Github account.

  • login to Github and click fork within each repository listed below.

2.Git clone each repository from your forks.

  • login to Github and copy the HTTPS URL from each of the repositories you have just forked, example URLs below.
  • From the workspace directory, for each repository URL execute the following command. Warning: Windows users must perform the below steps while logged into the monorail server and not from the host.
/home/<user>/<pathToYourWorkSpace>/$ git clone <URLtoYourFork>

3.Set up the upstream/master for each repository.

  • Navigate to the repository we wish to setup upstream, for this example we will do on-http.
$ cd /home/<user>/<pathToYourWorkSpace>/on-http/
$ git remote add upstream https://github.com/RackHD/on-http
  • Repeat the above step for each repository using the respective URL found in the list for step 1.
/<pathToYourWorkSpace>/<eachRepo>/$ git remote add upstream <RackHD_Repo_URL>

The advantage of setting up this upstream relationship, from your local repositories to the RackHD repositories, will be explained later under Use Cases.

4.Copy static files from Monorail server to respective locations within on-http & on-tftp

  • Ssh into the Monorail server.
/<pathToYourWorkSpace>/on-dev/build/bin/$ vagrant ssh dev
  • Make the common directory for on-http.
/home/vagrant/$ mkdir /home/vagrant/src/on-http/static/http/common/
  • Copy files to their expected locations.
$ cp /home/vagrant/tmp/common/* /home/vagrant/src/on-http/static/http/common/
$ cp /home/vagrant/tmp/tftp/* /home/vagrant/src/on-tftp/static/tftp/

5.Install dependicies

  • Ssh into the Monorail server.
/<pathToYourWorkSpace>/on-dev/build/bin/$ vagrant ssh dev
  • For each repository found below, within the /home/vagrant/src directory on the Monorail server install the node dependicies (node_modules), below we install for on-http.
/home/vagrant/src/on-http/$ npm install
  • on-http
  • on-taskgraph
  • on-tasks
  • on-tftp
  • on-dhcp-proxy
  • on-syslog

6.Use nodeforman to turn on monorail (from the monorail server) /home/vagrant/.

  • From the home directory run nodeforman.
/home/vagrant/$ sudo nf start

on-dev's People

Contributors

davidjohnblodgett avatar

Watchers

James Cloos avatar  avatar

Forkers

lacarb

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.