Skip to content

Commit

Permalink
Updated documentation about usage
Browse files Browse the repository at this point in the history
  • Loading branch information
gplanchat committed Mar 18, 2021
1 parent 8d04919 commit 89273ec
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 11 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,19 @@ and [Marello](https://www.marello.com/) development.
> but to provide an environment based on Docker as identical as
> possible to OroCloud and MarelloCloud on a personal computer.
What to expect from this tool?
---

This tool has to be used in addition ot the installation instructions
from Oro-family applications. It will build an execution environment
based on Docker and Docker Compose for your existing projects or can
be added to a brand-new project.

Documentation
---

* [Installation](docs/installation.md)
* [Usage](docs/usage.md)
* [Installation of the tool](docs/installation.md)
* [Usage in your Oro-family projects](docs/usage.md)
* [Frequently Asked Questions](docs/faq.md)
* [Docker for Mac optimizations](docs/docker-for-mac-optimizations.md)
* [Versions sunsetting policy, experimental and discontinued support](docs/sunsetting-policy.md)
Expand Down
2 changes: 1 addition & 1 deletion bin/build
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ $EXEC composer install --dev --optimize-autoloader \
&& $EXEC box build \
&& docker build -t kiboko/kloud:latest $DIRECTORY/build/ \
&& docker push kiboko/kloud \
&& $EXEC composer install --dev --optimize-autoloader
&& $EXEC composer install --dev --optimize-autoloader
2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Installation
Installation of the tool
===

Installing system-wide the `kloud` command
Expand Down
78 changes: 71 additions & 7 deletions docs/usage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Usage
Usage in your Oro-family projects
===

What do you need before starting?
---

* Optionally an existing directory with an Oro-family application sources.
* the `kloud` command available in one of the ways described in the [Installation](installation.md) instructions

Initialize your stack
---

Expand All @@ -13,8 +19,7 @@ Once the command is finished, you will have a file named `.env.dist` containing
This file has to be renamed to `.env` in order to be used by Docker Compose.
The command have set some ports values for all services, you may wish to change them depending on your environment.

#Available command line options
---
### Additional command line options

* Database engine selection
* `--mysql`: Set up the application to use MySQL.
Expand Down Expand Up @@ -43,8 +48,9 @@ The command have set some ports values for all services, you may wish to change
Upgrade your stack
---

In an existing project, you can upgrade the docker stack configuration. automagically.
You can invoke the following command that will guess what services needs to be updated and in case of differences, a wizard will ask you what you wish to keep or delete:
In an existing project, you can upgrade the docker stack configuration automagically.
You can invoke the following command that will guess what services needs to be updated
and in case of differences, a wizard will ask you what you wish to keep or delete:

`kloud stack:upgrade`

Expand All @@ -53,15 +59,73 @@ You can invoke the following command that will guess what services needs to be u
Build the required images
---

If you need to build the images you need in a stack, you can execute the following command:
In hte case you are using a [sunsetting or experimental version combination](sunsetting-policy.md),
you will need to build yourself the images. Any other version will be auomatically built and pushed
to Docker Hub, without the need for you to build them yourself.

Build all necessary images, you need to execute the following command:

`kloud image:build`

To enable experimental images, you will need to add option `--with-experimental`.
In case you are using experimental images, you will need to add the additional option `--with-experimental`.

Test the required images
---

If you need to test if the images you are using are following every constraint you would expect:

`kloud image:test`

Environment commands
---

After `kloud stack:init`, you can use the environment commands to do various actions on your local
machine or a remote server.

### Initialize an environment

* `kloud environment:init`: Initialize the environment file in local workspace.

### Environment variables

* `kloud environment:variable:add`: Add an environment variable.
* `kloud environment:variable:unset`: Unset an environment variable value.
* `kloud environment:variable:get`: Print an environment variable value.
* `kloud environment:variable:set`: Change an environment variable value.
* `kloud environment:variable:list`: Print the list of environment variables and their value.

### Deploy environment

* `kloud environment:deploy`: Deploy the application to a remote server using rsync and initialize docker services.

### Destroy the environment

* `kloud environment:destroy`: Destroy the docker infrastructure with associated volumes and remove remote directory.

### Start the environment's services

* `kloud environment:start`: Start docker services on the remote server.

### Stop the environment's services

* `kloud environment:stop`: Stop docker services on the remote server.

### Synchronize your local sources with the remote

* `kloud environment:rsync`: Synchronize remote directory according to local directory.

### Clear the Symfony cache

* `kloud environment:cache:clear`: SClear cache and restart FPM service.

### Dump the database from your environment

* `kloud environment:database:dump`: Dump the database in the current state.

### Load a database dump into your environment

* `kloud environment:database:load`: Load a database dump.

### Open a shell in the environment

* `kloud environment:shell`: Start a shell session for a service.

0 comments on commit 89273ec

Please sign in to comment.