From b0bfa5f1d31b81f15140871cf740e60e6c51c442 Mon Sep 17 00:00:00 2001 From: ahkui <14049597+ahkui@users.noreply.github.com> Date: Thu, 28 Jun 2018 13:24:08 +0800 Subject: [PATCH] Add netdata for monitoring server (#1613) * add netdata container * update document * update document each part separate with 6 * \n * remove unuse file --- DOCUMENTATION/content/documentation/index.md | 150 +++++++++++++------ DOCUMENTATION/content/introduction/index.md | 2 +- docker-compose.yml | 11 ++ env-example | 3 + 4 files changed, 119 insertions(+), 47 deletions(-) diff --git a/DOCUMENTATION/content/documentation/index.md b/DOCUMENTATION/content/documentation/index.md index 64aa2c15..44dfd077 100644 --- a/DOCUMENTATION/content/documentation/index.md +++ b/DOCUMENTATION/content/documentation/index.md @@ -7,6 +7,8 @@ weight: 3 + + ## List current running Containers ```bash @@ -134,6 +136,7 @@ More info on Containers rebuilding [here](#Build-Re-build-Containers). +
## Build/Re-build Containers @@ -155,6 +158,7 @@ You might use the `--no-cache` option if you want full rebuilding (`docker-compo +
## Add more Software (Docker Images) @@ -188,8 +192,6 @@ More [options](https://docs.docker.com/compose/reference/logs/) - -
@@ -243,6 +245,8 @@ docker-compose build php-fpm + +
## Change the PHP-CLI Version @@ -271,6 +275,8 @@ docker-compose build workspace + +
## Install xDebug @@ -346,6 +352,7 @@ Note: If `.php-fpm/xdebug` doesn't execute and gives `Permission Denied` error t +
@@ -384,35 +391,15 @@ To learn more about how Docker publishes ports, please read [this excellent post -
- -## Use Jenkins - -1) Boot the container `docker-compose up -d jenkins`. To enter the container type `docker-compose exec jenkins bash`. - -2) Go to `http://localhost:8090/` (if you didn't change your default port mapping) - -3) Authenticate from the web app. - -- Default username is `admin`. -- Default password is `docker-compose exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword`. - -(To enter container as root type `docker-compose exec --user root jenkins bash`). - -4) Install some plugins. - -5) Create your first Admin user, or continue as Admin. - -Note: to add user go to `http://localhost:8090/securityRealm/addUser` and to restart it from the web app visit `http://localhost:8090/restart`. - -You may wanna change the default security configuration, so go to `http://localhost:8090/configureSecurity/` under Authorization and choosing "Anyone can do anything" or "Project-based Matrix Authorization Strategy" or anything else. - - -
+ + + + + ## Install Laravel from a Docker Container @@ -532,6 +519,52 @@ docker-compose up -d php-worker + +
+ +## Use NetData + +1 - Run the NetData Container (`netdata`) with the `docker-compose up` command. Example: + +```bash +docker-compose up -d netdata +``` + +2 - Open your browser and visit the localhost on port **19999**: `http://localhost:19999` + + + + + + +
+ +## Use Jenkins + +1) Boot the container `docker-compose up -d jenkins`. To enter the container type `docker-compose exec jenkins bash`. + +2) Go to `http://localhost:8090/` (if you didn't chanhed your default port mapping) + +3) Authenticate from the web app. + +- Default username is `admin`. +- Default password is `docker-compose exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword`. + +(To enter container as root type `docker-compose exec --user root jenkins bash`). + +4) Install some plugins. + +5) Create your first Admin user, or continue as Admin. + +Note: to add user go to `http://localhost:8090/securityRealm/addUser` and to restart it from the web app visit `http://localhost:8090/restart`. + +You may wanna change the default security configuration, so go to `http://localhost:8090/configureSecurity/` under Authorization and choosing "Anyone can do anything" or "Project-based Matrix Authorization Strategy" or anything else. + + + + + +
## Use Redis @@ -701,6 +734,8 @@ docker-compose up -d adminer + +
## Use Portainer @@ -717,6 +752,7 @@ docker-compose up -d portainer +
## Use PgAdmin @@ -869,6 +905,10 @@ docker-compose up -d rethinkdb - set the `DB_DATABASE` to `database`. + + + +
## Use Minio @@ -901,6 +941,9 @@ docker-compose up -d minio + + +
## Use AWS @@ -920,6 +963,9 @@ docker-compose up -d aws + + +
## Use Grafana @@ -938,6 +984,9 @@ docker-compose up -d grafana + + +
@@ -959,6 +1008,11 @@ To install CodeIgniter 3 on Laradock all you have to do is the following simple 3 - Re-build your PHP-FPM Container `docker-compose build php-fpm`. + + + + +
## Install Symfony @@ -972,6 +1026,11 @@ To install CodeIgniter 3 on Laradock all you have to do is the following simple 5 - Visit `symfony.test` + + + + +
## Miscellaneous @@ -1055,6 +1114,11 @@ ssh -o PasswordAuthentication=no \ To login as root, replace laradock@locahost with root@localhost. + + + + +
## Change the (MySQL) Version @@ -1109,6 +1173,7 @@ The default username and password for the root MySQL user are `root` and `root ` +
## Create Multiple Databases (MySQL) @@ -1123,6 +1188,8 @@ GRANT ALL ON `your_db_1`.* TO 'mysql_user'@'%' ; + +
## Change MySQL port @@ -1311,6 +1378,7 @@ Linuxbrew is a package manager for Linux. It is the Linux version of MacOS Homeb +

@@ -1323,6 +1391,7 @@ You are free to modify the `aliases.sh` as you see fit, adding your own aliases +
## Install Aerospike extension @@ -1367,7 +1436,6 @@ e) set it to `true` -
## PHPStorm Debugging Guide @@ -1380,7 +1448,6 @@ Remote debug Laravel web and phpunit tests. -
## Keep track of your Laradock changes @@ -1395,7 +1462,6 @@ Remote debug Laravel web and phpunit tests. -
## Upgrading Laradock @@ -1416,9 +1482,6 @@ Moving from Docker Toolbox (VirtualBox) to Docker Native (for Mac/Windows). Requ - - -
## Improve speed on MacOS @@ -1447,6 +1510,9 @@ Quick Setup giude, (we recommend you check their docs) + + +
### Workaround B: using d4m-nfs @@ -1536,8 +1602,6 @@ Visit the [docker-sync documentation](https://github.com/EugenMayer/docker-sync/ - -
### B.2: using the d4m-nfs tool @@ -1584,16 +1648,6 @@ docker-compose up ... - - - - - - - - - -
## Common Problems @@ -1605,7 +1659,6 @@ docker-compose up ... -
## I see a blank (white) page instead of the Laravel 'Welcome' page! @@ -1619,6 +1672,7 @@ sudo chmod -R 777 storage bootstrap/cache +
## I see "Welcome to nginx" instead of the Laravel App! @@ -1628,6 +1682,7 @@ Use `http://127.0.0.1` instead of `http://localhost` in your browser. +
## I see an error message containing `address already in use` or `port is already allocated` @@ -1637,6 +1692,7 @@ Make sure the ports for the services that you are trying to run (22, 80, 443, 33 +
## I get NGINX error 404 Not Found on Windows. @@ -1649,6 +1705,7 @@ Make sure the ports for the services that you are trying to run (22, 80, 443, 33 +
## The time in my services does not match the current time @@ -1659,6 +1716,7 @@ Make sure the ports for the services that you are trying to run (22, 80, 443, 33 +
## I get MySQL connection refused diff --git a/DOCUMENTATION/content/introduction/index.md b/DOCUMENTATION/content/introduction/index.md index 8a957d92..7478f10e 100644 --- a/DOCUMENTATION/content/introduction/index.md +++ b/DOCUMENTATION/content/introduction/index.md @@ -97,7 +97,7 @@ Beanstalkd - RabbitMQ - PHP Worker - **Queueing Management:** Beanstalkd Console - RabbitMQ Console - **Random Tools:** -HAProxy - Certbot - Blackfire - Selenium - Jenkins - ElasticSearch - Kibana - Grafana - Mailhog - MailDev - Minio - Varnish - Swoole - Portainer - Laravel Echo... +HAProxy - Certbot - Blackfire - Selenium - Jenkins - ElasticSearch - Kibana - Grafana - Mailhog - MailDev - Minio - Varnish - Swoole - NetData - Portainer - Laravel Echo... Laradock introduces the **Workspace** Image, as a development environment. It contains a rich set of helpful tools, all pre-configured to work and integrate with almost any combination of Containers and tools you may choose. diff --git a/docker-compose.yml b/docker-compose.yml index e4b0f220..a611acee 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -715,3 +715,14 @@ services: ports: - 9010:9000 +### NetData ################################################ + netdata: + image: titpetric/netdata:latest + cap_add: + - SYS_PTRACE + volumes: + - /:/host:ro + ports: + - "${NETDATA_PORT}:19999" + networks: + - backend diff --git a/env-example b/env-example index f914e6e9..39d93185 100644 --- a/env-example +++ b/env-example @@ -357,3 +357,6 @@ LARAVEL_ECHO_SERVER_PORT=6001 SOLR_VERSION=5.5 SOLR_PORT=8983 SOLR_DATAIMPORTHANDLER_MYSQL=false + +### NETDATA ############################################### +NETDATA_PORT=19999