Installation documentation with vagrant
Closed this issue · 2 comments
Please, could you provide detailed installation instructions and a complete list of all dependencies, including their versions?
Preferably in the form of a tutorial providing all steps, how to install starhackit on a particular vagrant box, e.g. on most recent Ubuntu.
I.e.:
- Install VirtualBox (version [VirtualBoxVersion] or higher) and Vagrant (version [VagrantVersion] or higher)
- Open console/terminal
- Create a new directory and change to it:
$ mkdir mynewdirectory
$ cd mynewdirectory
- Download and run the virtual machine running [some particular version of some operating system]
$ vagrant init [boxName]
$ vagrant up --provider virtualbox
- ssh into your virtual machine
$ vagrant ssh
-
when you are ssh-connected to your virtual machine (marked $$), follow these steps to make starhackit up and runnig:
- install node.js version [minimalNodeVersion]-[maximalNodeVersion]
$$
[commands to install particular node.js version]- install npm.js version [minimalNpmVersion]-[maximalNpmVersion]
$$
[commands to install particular npm.js version]or
- check that your
npm
version is within [minimalNpmVersion]-[maximalNpmVersion]
$$ npm -v
- if not, follow these steps to install particular npm version:
$$
[commands to install particular npm.js version]-
Install these additional dependencies:
- [dependency1] - [minimalDependency1Version]-[maximalDependency1Version]
- [dependency2] - [minimalDependency2Version]-[maximalDependency2Version]
- [dependency3] - [minimalDependency3Version]-[maximalDependency3Version]
-
Steps to install [dependency1]:
$$
[step1]$$
[step2]$$
[step3]$$
[step4] -
Steps to install [dependency2]:
-
Steps to install [dependency3]:
-
Make new starhackit project following these steps:
- create a new project parent directory and change to it
$$ mkdir mynewproject $$ cd mynewproject
- git clone the repository into a new directory e.g.: projectname
$$ git clone https://github.com/FredericHeem/starhackit.git projectname
- change into project directory
$$ cd projectname
- optionally remove
.git
directory to disconnect with starhackit git project
$$ rm -rf .git
- install node dependencies
$$ npm i
- You may safely ignore following deprecation warnings:
- [DeprecationWarning1]
- [DeprecationWarning2]
- [DeprecationWarning3]
-
Start server by running
$$ cd server $$ npm start &
- You may check that your server is running and it's output by:
$$ curl 127.0.0.1:[portWhereWebApplicationIsRunnig]
- You may exit ssh connection to your virtual machine by
exit
command
$$ exit
-
You may stop your virtual machine from your host machine in directory where your vagrant box configuration is (mynewdirectory)
$ vagrant halt
- You may make your application accessible from your host system by modifying Vagrantfile in your vagrant box configuration directory (mynewdirectory), e.g. by adding following line after existing line
Vagrant.configure("2") do |config|
:
config.vm.network "forwarded_port", guest:[portWhereWebApplicationIsRunnig], host:8050
- You may need to reload your virtual box and restart your application
$ vagrant reload --provision
$ vagrant ssh
$$ cd mynewproject/projectname/server
$$ npm start &
- Now you should be able to point your browser in host machine on
http://localhost:8050
and see the application running.
So my question is - what should be in [bracketed parts] of this tutorial template above, in order that one might expect, that after following those steps, one have an "out of the box" working project?
(or (if needed), how should the tutorial structure be changed, that simply following its steps one might get a working project?)
Installing the client and the server in a production and other environment (uat, dev, ...) is not an easy task. This project is using Ansible for its deployment. I don't have the time and the will to repeat the whole deployment with Vagrant for now. However, I would be glad to receive and review pull requests implementing and documenting Vagrant deployment.