Instruction: dev environment

22
Instruction : Dev-environment Mulodo Vietnam Co., Ltd.

Transcript of Instruction: dev environment

Page 1: Instruction: dev environment

Instruction : Dev-environment

Mulodo Vietnam Co., Ltd.

Page 2: Instruction: dev environment

What we should do first.Please install following applications as basic engineering tools.

If you don’t know about following tools, it shows your knowledge is much less than usual engineers in the world. so you should check the mode/trend of engineering world.

It is needless to say, please don’t use “XAMP”, “MAMP” or such a obsoleted tools, from now, forever.

Page 3: Instruction: dev environment

T.O.C

Xcode Command line tools Homebrew ruby python Virtualbox Vagrant chef ansible

: IDE w/ build tools : many unix tools : package manager : a famous LWL : a famous LWL : virtual machine : manager of VM : IT automator : IT automator

Page 4: Instruction: dev environment

OSX start upInstall basic tools by Apple Inc (1/2)

1. Xcode

- Xcode itself is a IDE produced by Apple.

- Clang, gcc(Gnu C Compiler) and other dev tools would be installed.

2. command line tools

- many command line tools would be installed

- see.) /Library/Developer/CommandLineTools

Page 5: Instruction: dev environment

OSX start upInstall basic tools by Apple Inc (2/2)

- Xcode

- use Apple store

- command line tools

- use Xcode

- $ xcode-select --install

- use Mulodo serverhttp://jenkins.mulodo.com/clt.dmg

$ xcode-select —install

Page 6: Instruction: dev environment

OSX start upInstall Homebrew (1/2)

- Homebrew is a package manager of OSX.

- One of the most popular package manager in OSX world.

- previous most popular package manger was ‘MacPorts’.

Page 7: Instruction: dev environment

OSX start upInstall Homebrew (2/2)

- Use following command (one liner)

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

- Check Homebrew

$ brew doctor

- Update Homebrew

$ brew update

Page 8: Instruction: dev environment

RubyInstall ruby (1/4)

- Ruby is designed and implemented by Matz.

- It is designed with full object oriented policy. It was very obvious in following topic.

- Almost every language allows ‘a++’ and ‘++a’. but by ruby’s philosophy, only ‘++a’ is allowed.

- If you are interested in it, please check the logs of ruby dev. There are long and deep discussions.

- Many dev-ops tools are developed with ruby. such as, capistrano, chef….

Page 9: Instruction: dev environment

RubyInstall ruby (2/4)

1. check ruby in your system

$ ruby -v

if you’ve already installed ruby by Homebrew or rvm, please remove the ruby and rvm.

see.) “Note) clean your ruby.”

Page 10: Instruction: dev environment

RubyInstall ruby (3/4)

2. install rbenv

3. edit ~/.bash_profile

$ brew install rbenv ruby-build $ which rbenv /usr/local/bin/rbenv

$ vi ~/.bash_profile (add following line)

eval "$(rbenv init -)”

$ source ~/.bash_profile

Page 11: Instruction: dev environment

RubyInstall ruby (4/4)

4. install ruby

// get available ruby versions $ rbenv install -l // install ruby you want. $ rbenv install N.N.N // set the version as global $ rbenv global N.N.N // rehash ruby environment $ rbenv rehash // check binaries $ which ruby $ which gem

Page 12: Instruction: dev environment

RubyNote) clean your ruby

- if you’ve already installed ruby by Homebrew..

$ brew uninstall ruby-build $ brew uninstall rbenv $ brew uninstall ruby

- if you’ve already installed ruby by rvm…

$ rvm seppuku $ rm -fr ~./rvm

Page 13: Instruction: dev environment

Pythonupdate python (1/1)

1. update python

$ brew install python --framework

Page 14: Instruction: dev environment

VirtualBoxinstall VirtualBox (1/2)

- VirtualBox is one of the Virtual machine engine produced by Oracle.

- You can choose VM_ware Or some other Vitual machine engine. But, VirtualBox is free to use and very stable.

Page 15: Instruction: dev environment

VirtualBoxinstall VirtualBox (2/2)

- get DMG and install it to your OSX.

https://www.virtualbox.org/

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

HERE

Page 16: Instruction: dev environment

Vagrantinstall Vagrant (1/2)

- Vagrant is one of the Virtual machine manager. You can manage all of things like ‘VirtualBox’, ‘VM_ware’, ‘AWS EC2’ in same interface.

- Currently, Vagrant is one of the most used virtual machine manager in the world.

Page 17: Instruction: dev environment

Vagrantinstall Vagrant (2/2)

- get DMG and install it to your OSX.

https://www.vagrantup.com/

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

HERE

z

Page 18: Instruction: dev environment

Chefinstall Chef (1/3)

- chef is one of the most famous “IT Automation” tool.

https://www.chef.io/chef/

https://docs.chef.io/ruby.html (style guide)

- Chef has many functions/logic to manage “IT Automation”

- You should use Chef cookbook with following points

- order to execute: Each task will NOT execute in order from the top.

Page 19: Instruction: dev environment

Chefinstall Chef (2/3)

1. Install Chef-DK

Currently, Chef should be installed by Chef-DK. Please get DMG and install it.

https://downloads.chef.io/chef-dk/mac/#/

HERE

Page 20: Instruction: dev environment

Chefinstall Chef (3/3)

2. Install knife-solo, knife-zero

knife-solo: a tool to use Chef w/o server-client.

knife-zero: a tool to use Chef simply (for one target) with server-client model.

$ chef gem install knife-solo knife-zero

Page 21: Instruction: dev environment

Ansibleinstall Ansible (1/2)

Ansible is one of the most used “IT automation tools” in the World.

* Difference from “Chef” - no agent :

- Chef need to install agent into target machine, but Ansible does not need any agents.

- using python. - Chef is built by ruby, Ansible is made by python.

- more user than Chef - It seems that there are more users of Ansible

than Chef. - some functions of Chef are not implemented in

Ansible.

Page 22: Instruction: dev environment

Ansibleinstall Ansible (2/2)

use brew to install Ansible.

$ brew install ansible