Code Monkey home page Code Monkey logo

dev-setup's Introduction

Acme Dev Guide

This is the standard guide to use teracy-dev for teams/ organizations with multiple projects (microservices architecture).

We created acme101 GitHub organization as the standard reference for teracy-dev best practices.

We also use it as the tranining material, too. We've been adding a lof of simple projects to show how teracy-dev should be used.

We also use this as the reference for our existing and future clients' projects.

By following this reference, everyone can follow the best practices of teracy-dev.

Please follow this getting started guide to set up the development environment.

Please take a cup of coffee with you, you mostly don't have to do anything but wait for the result, enjoy!

Set up acme-dev

You should create <team/organization>-dev for all your team projects. We're going to create dev environment for Acme organization, so we need to create acme-dev directory.

Set up Acme projects

  • Stop watching files (Use Ctrl + c) on the file watching terminal window.

  • Fork the acme/angular-hello-world repo into your account.

  • Clone the forked acme/angular-hello-world repo into the ~/acme-dev/workspace directory.

    $ cd ~/acme-dev/workspace/
    $ git clone <your_forked_repository_here> angular-hello-world
    $ cd angular-hello-world
    $ git remote add upstream [email protected]:acme101/angular-hello-world.git
  • Clone the acme101/dev-setup repo into the ~/acme-dev/workspace directory.

    $ cd ~/acme-dev/workspace/
    $ git clone [email protected]:acme101/dev-setup.git
  • Type the following command:

    $ cd ~/acme-dev
    $ cp workspace/dev-setup/vagrant_config_override.example.json vagrant_config_override.json

    to create vagrant_config_override.json file on the acme-dev directory by copying the workspace/dev-setup/vagrant_config_override.example.json file (you can then adjust variables to your own need when required)

  • Reload the Vagrant box to make sure it's updated.

    $ cd ~/acme-dev
    $ vagrant reload --provision
  • After finishing running (take a long time to set everything up for the first time), you should see the following similar output:

    ==> default: [2017-03-10T03:04:21+00:00] INFO: Chef Run complete in 115.040022137 seconds
    ==> default: 
    ==> default: Running handlers:
    ==> default: [2017-03-10T03:04:21+00:00] INFO: Running report handlers
    ==> default: Running handlers complete
    ==> default: 
    ==> default: [2017-03-10T03:04:21+00:00] INFO: Report handlers complete
    ==> default: Chef Client finished, 19/27 resources updated in 01 minutes 56 seconds
    ==> default: Running provisioner: ip (shell)...
        default: Running: /var/folders/59/znjnt7bn73d7c7_4l0fsdzm80000gn/T/vagrant-shell20170310-39691-41628j.sh
    ==> default: ip address: 192.168.0.11
    ==> default: vagrant-gatling-rsync is starting the sync engine because you have at least one rsync folder. To disable this behavior, set `config.gatling.rsync_on_startup = false` in your Vagrantfile.
    ==> default: Doing an initial rsync...
    ==> default: Rsyncing folder: /Users/hoatle/acme-dev/workspace/ => /home/vagrant/workspace
    ==> default:   - Exclude: [".vagrant/", ".git", ".idea/", "node_modules/", "bower_components/", ".npm/"]
    ==> default: Watching: /Users/hoatle/acme-dev/workspace
  • Make sure the /etc/hosts file get updated automatically with the following commands:

    $ cd ~/acme-dev
    $ vagrant hostmanager
  • $ ping acme.dev to make sure it pings the right IP address of the VM: http://dev.teracy.org/docs/basic_usage.html#ip-address

  • $ cat /etc/hosts file from the host machine to make sure there is no duplicated entries for acme-dev or the VM IP address.

  • Now open http://dev.ahw.acme.dev or https://dev.ahw.acme.dev on your browser to see the web app and start working on it. For https, you need to add exception into your browsers. This is the defined domain from the angular-hello-world project for the dev mode. For more information, see https://github.com/acme101/angular-hello-world/blob/develop/README.md

How to start working

dev-setup's People

Contributors

hoatle avatar

Watchers

 avatar  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.