-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/staging' into insights_ui_tests
- Loading branch information
Showing
8 changed files
with
133 additions
and
39 deletions.
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
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 |
---|---|---|
|
@@ -20,45 +20,37 @@ Recommended hardware resources are: | |
|
||
Mist.io is a large application split into microservices which are packages in | ||
docker containers. The easiest way to run it is by using `docker-compose`. So, | ||
in order to run it, one needs to install a recent version of `docker` and | ||
`docker-compose`. | ||
|
||
There are two ways to run this application with docker-compose: | ||
|
||
|
||
### Single file deployment | ||
in order to run it, one needs to install a recent version of | ||
[docker](https://docs.docker.com/engine/installation/) and | ||
[docker-compose](https://docs.docker.com/compose/install/). | ||
|
||
If you want to install a stable release, head over to mist.io's github | ||
[releases](https://github.com/mistio/mist.io/releases/) and follow the | ||
instructions there. | ||
|
||
Alternatively, if you want to run the latest development version of mist.io, | ||
simply download the `docker-compose.yml` file from this repository and put it | ||
in a directory. The directory name is used by `docker-compose` as the `project` | ||
name, so use something descriptive and unique, like `mist.io`. | ||
run the following: | ||
|
||
You also need to set the environmental variable `MIST_TAG=staging`. Do that by | ||
either running `export MIST_TAG=staging` or for it to persist, do | ||
`echo MIST_TAG=staging > .env`. | ||
```bash | ||
mkdir mist.io && cd mist.io && echo 'MIST_TAG=master' > .env | ||
wget https://raw.githubusercontent.com/mistio/mist.io/master/docker-compose.yml | ||
docker-compose up -d | ||
``` | ||
|
||
After a few minutes (depending on your connection) all mist.io containers will | ||
be downloaded and started in the background. | ||
|
||
### Development deployment | ||
Run `docker-compose ps`. All containers should be in the UP state, except | ||
shortlived container elasticsearch-manage. | ||
|
||
Clone this git repo and all its submodules with something like: | ||
|
||
git clone --recursive https://github.com/mistio/mist.io.git | ||
cd mist.io | ||
|
||
This may take some time. | ||
|
||
This setup will mount the checked out code into the containers. By cloning the | ||
directory, now there's also a `docker-compose.override.yml` file in the current | ||
directory in addition to `docker-compose.yml` and is used to modify the | ||
configuration for development mode. | ||
To run a different mist.io version, replace `master` with a different branch's | ||
name in the above `echo` and `wget` commands. | ||
|
||
|
||
## Running mist.io | ||
|
||
Make sure you're inside the directory containing the `docker-compose.yml` file. | ||
|
||
Switch to the directory containing the `docker-compose.yml` file and run | ||
|
||
docker-compose up -d | ||
|
@@ -72,28 +64,56 @@ To create a user for the first time, first run | |
This should drop you in a shell into one of the mist.io containers. In there, | ||
run | ||
|
||
./bin/adduser --admin --docker-cloud [email protected] | ||
./bin/adduser --admin [email protected] | ||
|
||
Replace the email address with yours. Try running `./bin/adduser -h` for more | ||
options. The `--docker-cloud` flag will add the docker daemon hosting the | ||
mist.io installation as a docker cloud in the created account. | ||
|
||
Visit http://localhost and login with the email and password specified above. | ||
Mist.io binds on port 80 of the host. Visit http://localhost and login with the | ||
email and password specified above. | ||
|
||
Welcome to mist.io! Enjoy! | ||
|
||
|
||
## Configuring mist.io | ||
|
||
After the initial `docker-compose up -d`, you'll see that a configuration file | ||
is created in `./config/settings.py`. Edit this file to modify configuration | ||
and restart services (for example with `docker-compose restart`). | ||
is created in `./config/settings.py`. Edit this file to modify configuration. | ||
Any changes to the `./config/settings.py` require a restart to take effect: | ||
|
||
docker-compose restart | ||
|
||
|
||
### Required configuration | ||
|
||
#### URL | ||
|
||
If running on anything other than `localhost`, you'll need to set the | ||
`CORE_URI` setting in `./config/settings.py`. Example: | ||
|
||
CORE_URI = "http://198.51.100.12" | ||
|
||
|
||
### Mail settings | ||
|
||
In some cases, such as user registration, forgotten passwords, user invitations | ||
etc, mist.io needs to send emails. By default, mist.io is configured to use a | ||
mock mailer. To see logs sent by mist.io, run | ||
|
||
docker-compose logs -f mailmock | ||
|
||
If you wish to use a real SMTP server, edit `./config/settings.py` and modify | ||
`MAILER_SETTINGS`. | ||
|
||
Don't forget to restart docker-compose for changes to take effect. | ||
|
||
|
||
## Managing mist.io | ||
|
||
Mist.io is managed using `docker-compose`. Look that up for details. Some | ||
useful commands: | ||
useful commands follow. Keep in mind that you need to run these from inside the | ||
directory containing the `docker-compose.yml` file: | ||
|
||
# See status of all applications | ||
docker-compose ps | ||
|
@@ -123,3 +143,24 @@ useful commands: | |
|
||
# Completely remove all containers and data volumes. | ||
docker-compose down -v | ||
|
||
|
||
## Development deployment | ||
|
||
If you're planning to modify mist.io's source code, an alternative installation | ||
method is recommended. | ||
|
||
Clone this git repo and all its submodules with something like: | ||
|
||
git clone --recursive https://github.com/mistio/mist.io.git | ||
cd mist.io | ||
docker-compose up -d | ||
|
||
This may take some time. | ||
|
||
This setup will mount the checked out code into the containers. By cloning the | ||
directory, now there's also a `docker-compose.override.yml` file in the current | ||
directory in addition to `docker-compose.yml` and is used to modify the | ||
configuration for development mode. | ||
|
||
The above instructions for running and managing mist.io apply. |
Submodule api
updated
13 files
+2 −0 | .dockerignore | |
+4 −0 | .gitignore | |
+1 −1 | .gitlab-ci.yml | |
+13 −6 | Dockerfile | |
+43 −0 | bin/beat | |
+20 −1 | src/mist/api/config.py | |
+0 −0 | src/mist/api/portal/__init__.py | |
+77 −0 | src/mist/api/portal/models.py | |
+18 −0 | src/mist/api/portal/schedulers.py | |
+67 −0 | src/mist/api/portal/tasks.py | |
+1 −0 | src/mist/api/tasks.py | |
+5 −0 | src/mist/api/users/methods.py | |
+6 −0 | src/mist/api/views.py |
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
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
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM mist/mist:io-staging | ||
|
||
ARG IO_VERSION_SHA | ||
ARG IO_VERSION_NAME | ||
|
||
# Variables defined solely by ARG are accessible as environmental variables | ||
# during build but not during runtime. To persist these in the image, they're | ||
# redefined as ENV in addition to ARG. | ||
ENV VERSION_REPO=mistio/mist.io \ | ||
VERSION_SHA=$IO_VERSION_SHA \ | ||
VERSION_NAME=$IO_VERSION_NAME | ||
|
||
RUN echo "{\"sha\":\"$VERSION_SHA\",\"name\":\"$VERSION_NAME\",\"repo\":\"$VERSION_REPO\",\"modified\":false}" \ | ||
> /mist-version.json |
Submodule tests
updated
8 files
Submodule ui
updated
10 files
+1 −1 | src/add-graph.html | |
+0 −90 | src/app-rules/app-rules.html | |
+1 −1 | src/element-for-in/element-for-in.html | |
+28 −7 | src/mist-app.html | |
+5 −2 | src/mist-header/mist-header.html | |
+36 −18 | src/mist-header/search-suggestions.html | |
+11 −10 | src/mist-header/top-search.html | |
+63 −0 | src/mist-notice.html | |
+4 −1 | src/mist-sidebar.html | |
+1 −1 | src/page-tunnels.html |