Skip to content

Commit a676bc1

Browse files
committed
@ #167 | add getting started guide
1 parent d61c9fd commit a676bc1

File tree

4 files changed

+217
-89
lines changed

4 files changed

+217
-89
lines changed

docs/advanced_usage.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Advanced Usage
2+
==============
3+
4+
//TODO(hoatle): complete this

docs/basic_usage.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Basic Usage
2+
===========
3+
4+
// TODO(hoatle): complete this

docs/getting_started.rst

Lines changed: 207 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,130 +1,228 @@
11
Getting Started
22
===============
33

4-
To get started, you must follow the instruction steps below to set up the development environment.
4+
``teracy-dev`` is created to set up an universal development platform which has the same development
5+
workflow on Mac, Linux and Windows with good developer experience and productivity in mind.
56

67

7-
Prerequisites
8-
-------------
8+
Please follow the installation instruction below, after that, the instruction step for teracy-dev
9+
`git clone` and `vagrant up` is the same on all the platforms.
910

10-
At Teracy, you need to install the tools below:
1111

12-
- ``virtualbox``
13-
- ``vagrant``
14-
- ``git``
15-
- ``rsync``
12+
.. note::
13+
14+
- The 64-bit architecture is used and run every day by us, however, the 32-bit archirecture is
15+
expected to work, too.
16+
17+
- We recommend the following tested and supported platforms:
18+
19+
+ macOS Sierra
20+
+ Ubuntu 16.04
21+
+ Windows 10, Windows 8, Windows 7
22+
23+
Other platforms are expected to work, but we haven't fully tested them yet.
24+
25+
26+
Automatic Installation on macOS
27+
-------------------------------
28+
29+
// TODO(hoatle): https://github.com/teracyhq/dev/issues/162
30+
31+
32+
Manual Installation on macOS
33+
----------------------------
34+
35+
Check out the video and follow step by step instructions below:
36+
37+
.. raw:: html
38+
39+
<iframe width="560" height="315" src="https://www.youtube.com/embed/htGqh_UyY_I" frameborder="0" allowfullscreen></iframe>
40+
41+
Open terminal window to:
42+
43+
1. Install ``Homebrew`` and ``Homebrew Cask``
44+
45+
- http://brew.sh/
46+
- https://caskroom.github.io/
47+
48+
2. Install ``virtualbox`` and ``vagrant``
49+
50+
- Install ``virtualbox`` (>=5.1):
51+
52+
.. code-block:: bash
53+
54+
$ brew cask install virtualbox
55+
56+
- Install ``vagrant`` (>=1.8, <1.9):
57+
58+
.. code-block:: bash
59+
60+
$ brew cask install vagrant
61+
62+
.. note::
63+
64+
- If the above command installs ``vagrant`` >=1.9, make sure to install the right version by
65+
downloading the installation file manually from https://releases.hashicorp.com/vagrant/
66+
67+
- // FIXME(hoatle): https://github.com/teracyhq/dev/issues/175
68+
69+
70+
Automatic Installation on Linux (Ubuntu)
71+
----------------------------------------
72+
73+
// TODO(hoatle): https://github.com/teracyhq/dev/issues/162
74+
75+
76+
Manual Installation on Linux (Ubuntu)
77+
-------------------------------------
78+
79+
Check out the video and follow step by step instructions below:
80+
81+
.. raw:: html
82+
83+
<iframe width="560" height="315" src="https://www.youtube.com/embed/MteK5c1r6B8" frameborder="0" allowfullscreen></iframe>
84+
85+
Open terminal window to:
86+
87+
1. Install ``git``
88+
89+
.. code-block:: bash
90+
91+
$ sudo apt-get update
92+
$ sudo apt-get install -y git
93+
94+
2. Install ``virtualbox`` (>=5.1):
1695

96+
Find the right installation version file at https://www.virtualbox.org/wiki/Linux_Downloads or
97+
https://www.virtualbox.org/wiki/Download_Old_Builds
1798

18-
on Mac
19-
------
20-
//TODO(hoatle)
99+
.. code-block:: bash
21100
22-
on Linux
23-
--------
24-
//TODO(hoatle)
101+
$ cd /tmp/
102+
$ wget <download_link>
103+
$ sudo dpkg -i <downloaded_file>
104+
$ sudo apt-get install -r -y
25105
26-
on Windows
27-
----------
28-
//TODO(hoatle)
106+
3. Install ``vagrant`` (>=1.8, <1.9):
29107

30-
- You MUST install ``cygwin`` to use ``git``, ``rsync``, from now on, it is called ``terminal window``.
108+
Find the right installation version file at https://releases.hashicorp.com/vagrant/ or
109+
https://www.vagrantup.com/downloads.html
31110

111+
.. code-block:: bash
32112
33-
Automatic Installation
34-
----------------------
113+
$ cd /tmp/
114+
$ wget <download_link>
115+
$ sudo dpkg -i <downloaded_file>
35116
36-
To install required packages automatically, you need run **Ubuntu** 12.04 and newer. If not, you
37-
need to move to the next alternative instruction by installing required packages manually.
38117
39-
Installing ``git``, ``virtualbox``, ``vagrant`` with the provided bash script below:
118+
Automatic Installation on Windows
119+
---------------------------------
40120

41-
::
121+
// TODO(hoatle): add this
42122

43-
$ cd /tmp && wget -qO- https://raw.github.com/teracyhq/dev/develop/scripts/setup_working_env_chef.sh | bash
44123

45-
On Windows (Windows 7, Windows 8 & Windows 10), follow these steps:
124+
Manual Installation on Windows
125+
------------------------------
46126

47-
1. Open: https://raw.github.com/teracyhq/dev/develop/scripts/setup_vagrant_and_virtualbox.bat on Chrome or Firefox.
127+
This should be the same on Windows 10, Windows 8 and Windows 7.
48128

49-
2. Press ``Ctrl + S``.
129+
Check out the video and follow step by step instructions below:
50130

51-
3. Select the option ``Save as type: Text document``, with the name "setup_vagrant_and_virtualbox.bat" (notice the double quote).
131+
.. raw:: html
52132

53-
4. Open it by double-clicking on ``setup_vagrant_and_virtualbox.bat``.
133+
<iframe width="560" height="315" src="https://www.youtube.com/embed/SBOoUIVI3Jw" frameborder="0" allowfullscreen></iframe>
54134

55-
Now you should have ``vagrant`` and ``virtualbox`` installed on your system.
56135

136+
1. Install ``chocolatey``
57137

58-
Manual Installation
59-
-------------------
138+
Run ``Command Prompt`` as administrator and paste the Cmd.exe command from
139+
https://chocolatey.org/install
60140

61-
1. Install the latest ``cygwin`` version at https://www.cygwin.com/ and choose to install the
62-
following packages:
141+
2. Install ``cyg-get``
142+
143+
Type the command below on the opened ``Command Prompt``:
63144

64-
- bash
65-
- bash-completion
66-
- git
67-
- openssh
68-
- rsync
145+
.. code-block:: bash
69146
70-
2. Install ``virtualbox`` with the exact version of **5.1.8** (or newer) at
71-
https://www.virtualbox.org/wiki/Downloads.
147+
> choco install cyg-get -y
148+
149+
3. Install ``bash-completion``, ``git``, ``virtualbox`` and ``vagrant``
150+
151+
Run ``Cygwin Terminal`` as administrator with the following commands:
152+
153+
- Install ``bash-completion``:
154+
155+
.. code-block:: bash
156+
157+
$ cyg-get.bat bash-completion
158+
159+
- Install ``git``:
160+
161+
.. code-block:: bash
162+
163+
$ cyg-get.bat git
164+
165+
- Install ``virtualbox``:
166+
167+
.. code-block:: bash
168+
169+
$ choco install virtualbox -y
170+
171+
- Install ``vagrant``:
172+
173+
.. code-block:: bash
174+
175+
$ choco install vagrant -y
72176
73-
3. Install ``vagrant`` with the exact version of **1.8.7** (or newer) at
74-
https://releases.hashicorp.com/vagrant/1.8.7/.
75177
76178
.. note::
77179

78-
- The 64-bit architecture is used and run every day by us, however, the 32-bit archirecture is
79-
expected to work, too.
180+
- If you encounter the following error:
80181

81-
- The virtualbox has an installation issue which is reported `here
82-
<https://www.virtualbox.org/ticket/4140>`_. If you `$ vagrant up` but can not start the
83-
virtual box, please find "VBoxUSBMon.inf" & "VBoxDrv.inf" in your installation directory and
84-
re-install it to fix the issue.
182+
.. code-block:: bash
85183
86-
Git Setup
87-
---------
184+
C:\ProgramData\chocolatey\lib\cyg-get\tools\cyg-get.ps1 : Please ensure you have Cygwin installed.
185+
To install please call 'choco install cygwin' (optionally add -y to autoconfirm).
186+
ERROR: This command cannot be run due to the error: The system cannot find the file specified.
187+
At line:1 char:1
188+
189+
then fix it with: https://github.com/chocolatey/chocolatey-coreteampackages/issues/176#issuecomment-212939458
88190

89-
Complete the following guides to get it work:
191+
- If you ``$ vagrant up`` but can not start the VirtualBox, please find "VBoxUSBMon.inf" and
192+
"VBoxDrv.inf" in your installation directory then re-install it to fix the issue. The
193+
VirtualBox has an installation issue which was reported `here <https://www.virtualbox.org/ticket/4140>`_
90194

91-
- https://help.github.com/categories/ssh/
92195

93196

94-
Environment Up
95-
--------------
197+
teracy-dev Git Clone and Vagrant Up
198+
-----------------------------------
96199

97200
1. Open your terminal window and type:
98-
::
201+
202+
.. code-block:: bash
99203
100204
$ cd ~/
101205
$ git clone https://github.com/teracyhq/dev.git teracy-dev
102206
$ cd teracy-dev
207+
$ git checkout develop
103208
$ vagrant up
104209
105-
.. note::
106-
107-
- The home directory on ``Git Bash`` normally should point to your user's directory on windows.
108-
For example: ``C:\Documents and Settings\<user_name>``, this is the place you will find
109-
``teracy-dev`` directory to import projects into your text editor later for coding.
110-
111-
- You may see the error:
210+
.. note::
112211

113-
.. code-block:: bash
212+
We checkout the `develop` branch here to use the latest development version of teracy-dev.
213+
When it is released, we will use the `master` branch - the latest stable version instead.
114214

115-
Vagrant uses the `VBoxManage` binary that ships with VirtualBox, and requires this to be
116-
available on the PATH. If VirtualBox is installed, please find the `VBoxManage` binary and
117-
add it to the PATH environmental variable.
215+
You could see the error message saying that `vagrant-gatling-rsync` and `vagrant-rsync-back`
216+
plugins are required, so install them:
118217

119-
To fix this error, add the path of the **VirtualBox** folder to your environment variable.
218+
.. code-block:: bash
120219
121-
For example: In Windows, add this ``C:\Program Files\Oracle\VirtualBox``.
220+
$ vagrant plugin install vagrant-gatling-rsync
221+
$ vagrant plugin install vagrant-rsync-back
122222
123-
If the error still occurs, you have to unistall and re-install VirtualBox, then Vagrant to fix
124-
this error.
125223
126-
You should see the following similar messages after ``$ vagrant up`` finishes running:
127-
::
224+
You should see the following similar messages after ``$ vagrant up`` finishes running:
225+
::
128226

129227
==> default: [2016-11-25T06:02:16+00:00] INFO: Report handlers complete
130228
==> default: Chef Client finished, 9/15 resources updated in 03 minutes 36 seconds
@@ -134,27 +232,47 @@ Environment Up
134232
==> default: ip address: 192.168.0.105
135233
==> 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.
136234
==> default: Doing an initial rsync...
137-
==> default: Rsyncing folder: /Users/hoatle/teracy-dev-docker/workspace/teracy-dev/workspace/ => /home/vagrant/workspace
235+
==> default: Rsyncing folder: /Users/hoatle/teracy-dev/workspace/ => /home/vagrant/workspace
138236
==> default: - Exclude: [".vagrant/", ".git", ".idea/", "node_modules/", "bower_components/", ".npm/"]
139237

238+
239+
.. note::
240+
241+
- You may see the error:
242+
::
243+
244+
vagrant uses the VBoxManage binary that ships with VirtualBox, and requires this to be
245+
available on the PATH. If VirtualBox is installed, please find the VBoxManage binary and
246+
add it to the PATH environmental variable.
247+
248+
To fix this error, add the path of the **VirtualBox** folder to your environment variable.
249+
250+
For example: In Windows, add this ``C:\Program Files\Oracle\VirtualBox``.
251+
252+
If the error still occurs, you have to unistall and re-install ``virtualbox``, then
253+
``vagrant`` to fix this error.
254+
140255
2. Use the ``$ vagrant ssh`` command to access the virtual machine you have just
141-
installed which runs Ubuntu 12.04 with ssh. You should see the following similar messages:
142-
::
256+
provisioned. You should see the following similar messages:
257+
258+
.. code-block:: bash
143259
144-
Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-101-generic x86_64)
260+
Welcome to Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-51-generic x86_64)
145261
146-
* Documentation: https://help.ubuntu.com/
262+
* Documentation: https://help.ubuntu.com
263+
* Management: https://landscape.canonical.com
264+
* Support: https://ubuntu.com/advantage
147265
148-
System information as of Fri Nov 25 06:02:18 UTC 2016
266+
1 package can be updated.
267+
1 update is a security update.
149268
150-
System load: 0.79 Users logged in: 0
151-
Usage of /: 5.6% of 39.34GB IP address for eth0: 10.0.2.15
152-
Memory usage: 10% IP address for eth1: 192.168.0.105
153-
Swap usage: 0% IP address for docker0: 172.17.0.1
154-
Processes: 89
155269
156-
Graph this data and manage this system at:
157-
https://landscape.canonical.com/
270+
Last login: Tue Dec 6 14:19:56 2016 from 10.0.2.2
271+
272+
Git Setup
273+
---------
274+
275+
To work with ``git``, complete the following guides to set up ssh keys:
276+
https://help.github.com/categories/ssh/
158277

159-
Get cloud support with Ubuntu Advantage Cloud Guest:
160-
http://www.ubuntu.com/business/services/cloud
278+
*Congratulations, you’ve all set now!*

docs/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Contents:
1313

1414
intro
1515
getting_started
16+
basic_usage
17+
advanced_usage
1618
tool_chain
1719
built_in_ide
1820
style_standards

0 commit comments

Comments
 (0)