-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update doc docker #231
Merged
Merged
update doc docker #231
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Install OpenOrchestra with Docker for contributors | ||
=================================================== | ||
================================================== | ||
|
||
Open Orchestra is composed of three projects: | ||
|
||
|
@@ -11,176 +11,97 @@ Open Orchestra is composed of three projects: | |
For contributors, we provide a Docker environment so you get minimal | ||
setup actions to do. | ||
|
||
Install Virtualbox (for MacOS and Windows) | ||
------------------------------------------ | ||
|
||
Mac OS | ||
|
||
- download http://download.virtualbox.org/virtualbox/4.3.20/VirtualBox-4.3.20-96996-OSX.dmg | ||
|
||
Windows | ||
|
||
- download http://download.virtualbox.org/virtualbox/4.3.20/VirtualBox-4.3.20-96997-Win.exe | ||
|
||
Install Docker | ||
--------------- | ||
The project is running in a virtual environment to be production ready. | ||
|
||
### Linux ### | ||
|
||
.. code-block:: bash | ||
|
||
$ sudo apt-get update | ||
$ sudo apt-get install wget | ||
$ sudo apt-get install curl | ||
$ wget -qO- https://get.docker.com/ | sh | ||
|
||
Note: If your company is behind a filtering proxy, you may find that the apt-key command fails for the Docker repository during installation. To work around this, add the key directly using the following: | ||
|
||
.. code-block:: bash | ||
|
||
$ wget -qO- https://get.docker.com/gpg | sudo apt-key add - | ||
|
||
Create docker group | ||
|
||
.. code-block:: bash | ||
|
||
$ sudo usermod -aG docker ubuntu | ||
|
||
Install docker compose | ||
|
||
.. code-block:: bash | ||
|
||
$ curl -L https://github.com/docker/compose/releases/download/1.5.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose | ||
$ chmod +x /usr/local/bin/docker-compose | ||
|
||
### Mac OS ### | ||
|
||
.. code-block:: text | ||
|
||
download https://www.docker.com/docker-toolbox (mac version) | ||
install the package | ||
open a terminal (e.g. http://cmder.net/) | ||
|
||
type the commands | ||
|
||
.. code-block:: bash | ||
|
||
$ docker-machine create default --driver=virtualbox | ||
$ eval $(docker-machine env default) | ||
|
||
### Windows ### | ||
|
||
.. code-block:: text | ||
|
||
download https://www.docker.com/docker-toolbox (mac version) | ||
install the package | ||
open a terminal (e.g. http://cmder.net/) | ||
|
||
type the commands | ||
|
||
.. code-block:: bash | ||
|
||
$ docker-machine create default --driver=virtualbox | ||
$ eval $(docker-machine env default) | ||
|
||
Download Composer | ||
----------------- | ||
|
||
Composer is the package manager used by modern PHP applications. | ||
|
||
To install composer with curl: | ||
-------------- | ||
|
||
.. code-block:: bash | ||
Install of Open Orchestra with docker require `Compose 1.6.0+` and `Docker Engine 1.10.+`. | ||
|
||
$ curl -sS https://getcomposer.org/installer | php | ||
- Install Docker for `Linux <https://docs.docker.com/engine/installation/linux/>`_ | ||
- Install Docker for `Mac <https://docs.docker.com/docker-for-mac/>`_ | ||
- Install Docker for `Windows <https://docs.docker.com/docker-for-windows/>`_ | ||
|
||
If you don't have curl installed, you can also download it with PHP: | ||
|
||
.. code-block:: bash | ||
|
||
$ php -r "readfile('https://getcomposer.org/installer');" | php | ||
|
||
see `Download Composer`_ | ||
|
||
Install OpenOrchestra | ||
--------------------- | ||
|
||
First of all, you have to clone the Open Orchestra Docker repository: | ||
Clone the Open Orchestra applications repository and Docker repositories in the same folder: | ||
|
||
.. code-block:: bash | ||
|
||
$ cd <your_project_folder>/ | ||
$ git clone git@github.com:open-orchestra/open-orchestra-provision-docker.git | ||
$ git clone git@github.com:open-orchestra/open-orchestra.git | ||
$ git clone git@github.com:open-orchestra/open-orchestra-front-demo.git | ||
$ git clone git@github.com:open-orchestra/open-orchestra-media-demo.git | ||
$ mkdir uploaded-files | ||
|
||
Build Docker containers: | ||
|
||
To contribute to the project a script can install two versions: the master version and the last stable one. The master branch is the branch which should be used to add new features to the project. | ||
Here is the directory tree with your two projects: | ||
.. code-block:: bash | ||
|
||
.. code-block:: none | ||
$ cd <your_project_folder>/open-orchestra-provision-docker/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. empty line missing (?). |
||
$ docker-compose up -d | ||
|
||
|_ open-orchestra-provision-docker | ||
|_ open-orchestra-master | ||
|_ open-orchestra | ||
|_ open-orchestra-front-demo | ||
|_ open-orchestra-media-demo | ||
|_ open-orchestra-provision | ||
|_ open-orchestra-stable | ||
|_ open-orchestra | ||
|_ open-orchestra-front-demo | ||
|_ open-orchestra-media-demo | ||
|_ open-orchestra-provision | ||
|
||
1. Easy way | ||
Install applications: | ||
|
||
You can run all the commands below with one script : | ||
Back Office: | ||
|
||
.. code-block:: bash | ||
|
||
$ ./install.sh master | ||
or | ||
$ ./install.sh stable | ||
|
||
2. Manual way | ||
$ cd <your_project_folder>/open-orchestra-provision-docker/ | ||
$ docker exec -it -u www-data oo_apache_php /bin/bash | ||
$ cd /var/www/openorchestra/ && composer install #install vendors | ||
|
||
When to complete the application settings, use these parameters (use default value for other) | ||
|
||
.. code-block:: yaml | ||
|
||
To install the master open-orchestra parts using ``composer``: | ||
open_orchestra_cms.mongodb.host: oo_mongo | ||
fos_http_cache.proxy_client.varnish.servers: [oo_varnish:6081] | ||
host_elastica: oo_elasticsearch | ||
media.directory: /var/www/uploaded-files | ||
|
||
In your ``open-orchestra-master`` directory: | ||
|
||
.. code-block:: bash | ||
|
||
$ [path-to-composer]/composer.phar create-project open-orchestra/open-orchestra ./open-orchestra -s dev --ignore-platform-reqs --no-scripts --keep-vcs dev-master | ||
$ [path-to-composer]/composer.phar create-project open-orchestra/open-orchestra-front-demo ./open-orchestra-front-demo -s dev --ignore-platform-reqs --no-scripts --keep-vcs dev-master | ||
$ [path-to-composer]/composer.phar create-project open-orchestra/open-orchestra-media-demo ./open-orchestra-media-demo -s dev --ignore-platform-reqs --no-scripts --keep-vcs dev-master | ||
$ ./bin/grunt #install assets | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. empty line missing (?). |
||
$ app/console orchestra:mongo:fixtures:load --env=prod --type=all #load fixtures | ||
$ exit | ||
|
||
Build Docker containers : | ||
Front Office: | ||
|
||
.. code-block:: bash | ||
|
||
$ docker-compose -f docker-compose.yml -f docker-compose-master.yml up -d | ||
$ cd <your_project_folder>/open-orchestra-provision-docker/ | ||
$ docker exec -it -u www-data oo_apache_php /bin/bash | ||
$ cd /var/www/front-openorchestra/ && composer install | ||
$ app/console assets:install | ||
$ exit | ||
|
||
- To install the stable open-orchestra parts using ``composer``: | ||
When to complete the application settings, use these parameters (use default value for other) | ||
|
||
In your ``open-orchestra-stable`` directory: | ||
|
||
.. code-block:: bash | ||
.. code-block:: yaml | ||
|
||
$ [path-to-composer]/composer.phar create-project open-orchestra/open-orchestra ./open-orchestra -s stable --ignore-platform-reqs --no-scripts --keep-vcs | ||
$ [path-to-composer]/composer.phar create-project open-orchestra/open-orchestra-front-demo ./open-orchestra-front-demo -s stable --ignore-platform-reqs --no-scripts --keep-vcs | ||
$ [path-to-composer]/composer.phar create-project open-orchestra/open-orchestra-media-demo ./open-orchestra-media-demo -s stable --ignore-platform-reqs --no-scripts --keep-vcs | ||
open_orchestra_cms.mongodb.server: 'mongodb://oo_mongo:27017' | ||
fos_http_cache.proxy_client.varnish.servers: [oo_varnish:6081] | ||
host_elastica: oo_elasticsearch | ||
|
||
Build Docker containers : | ||
Media: | ||
|
||
.. code-block:: bash | ||
|
||
$ docker-compose -f docker-compose.yml -f docker-compose-stable.yml up -d | ||
$ cd <your_project_folder>/open-orchestra-provision-docker/ | ||
$ docker exec -it -u www-data oo_apache_php /bin/bash | ||
$ cd /var/www/media-openorchestra/ && composer install | ||
$ exit | ||
|
||
When to complete the application settings, use these parameters (use default value for other) | ||
|
||
Parameters to define at the end of composer install | ||
--------------------------------------------------- | ||
.. code-block:: yaml | ||
|
||
.. code-block:: yaml | ||
media.directory: /var/www/uploaded-files | ||
|
||
open_orchestra_cms.mongodb.host : mongo | ||
fos_http_cache.proxy_client.varnish.servers : [varnish:6081] | ||
host_elastica : elastica | ||
|
||
Override the DNS redirections | ||
----------------------------- | ||
|
@@ -190,60 +111,8 @@ In the ``/etc/hosts`` file of your computer add the following lines: | |
[IP] must be replaced by 127.0.0.1 for Linux | ||
[IP] must be replaced by the value gived by the command ``docker-machine ip default`` | ||
|
||
.. code-block:: text | ||
|
||
[IP] admin.openorchestra.dev | ||
[IP] demo.openorchestra.dev | ||
[IP] media.openorchestra.dev | ||
[IP] admin.openorchestra.stable | ||
[IP] demo.openorchestra.stable | ||
[IP] media.openorchestra.stable | ||
|
||
You should follow the same steps to install each versions : | ||
|
||
* Run the containers | ||
* Install the assets | ||
* Load the fixtures | ||
|
||
Run the init script | ||
------------------- | ||
|
||
To finish the insytallation, you must launch an init script inside the main container by using this command: | ||
|
||
.. code-block:: bash | ||
|
||
$ docker exec -it app_open_orchestra_master /load.sh | ||
or | ||
$ docker exec -it app_open_orchestra_stable /load.sh | ||
|
||
It will take some time to: | ||
|
||
* prepare the cache and logs directories inside the App container | ||
* NPM Install (it's the longer process of the procedure) | ||
* Composer install | ||
* Load fixtures | ||
* Create ElasticSearch Indexes and populate data | ||
* Launch Grunt to install the assets | ||
|
||
|
||
Result | ||
------ | ||
|
||
Master version | ||
~~~~~~~~~~~~~~ | ||
|
||
You can log on http://admin.openorchestra.dev/app_dev.php/login with username=admin and | ||
password=admin for the CMS and see the result on http://demo.openorchestra.dev/app_dev.php. | ||
|
||
All the images will be visible on the http://media.openorchestra.dev/app_dev.php url. | ||
|
||
Stable version | ||
~~~~~~~~~~~~~~ | ||
|
||
You can log on http://admin.openorchestra.stable/app_dev.php/login with username=admin and | ||
password=admin for the CMS and see the result on http://demo.openorchestra.stable/app_dev.php. | ||
|
||
All the images will be visible on the http://media.openorchestra.stable/app_dev.php url. | ||
|
||
.. _`Download Composer`: https://getcomposer.org/download/ | ||
.. code-block:: text | ||
|
||
[IP] admin.openorchestra.dev | ||
[IP] demo.openorchestra.dev | ||
[IP] media.openorchestra.dev |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked at the full file with the rst rendering and it looks like this code-block isn't shown.
I think you have to keep an empty line beetween
.. code-block:: bash
and the first line of code (here :$ cd <your_project_folder>/
).So, empty line missing (?).