-
Pre-Conditions: https://docs.docker.com/engine/swarm/swarm-tutorial/#/three-networked-host-machines For distributed Minio to run, you need 4 networked host machines.
-
Create a new swarm and set the manager. SSH to one of the host machine, which you want to set as manager and run:
docker swarm init --advertise-addr <MANAGER-IP> -
Current node should become the manager. Check using:
docker node ls -
Open a terminal and ssh into the machine where you want to run a worker node.
-
Run the command as output by the step where master is created. It will add the current machine (as a worker) to the swarm. Add all the workers similarly.
-
Check if all the machines are added as workers, SSH to the master and run:
docker node ls
This file contains hidden or 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
| local client = require 'http.client' | |
| local fiber = require 'fiber' | |
| local yaml = require 'yaml' | |
| local uris = { | |
| 'http://httpbin.org/get?1', | |
| 'http://httpbin.org/get?2', | |
| 'http://httpbin.org/get?3', | |
| 'http://httpbin.org/get?4', | |
| 'http://httpbin.org/get?5', |
This file contains hidden or 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
| version: "3" | |
| services: | |
| postgres-db: | |
| image: postgres | |
| restart: always | |
| ports: | |
| - 5432:5432 | |
| environment: | |
| POSTGRES_PASSWORD: postgres |
This file contains hidden or 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
| <?php | |
| namespace Tests\Traits; | |
| use KushyApi\User; | |
| trait AttachJwtToken | |
| { | |
| /** | |
| * @var User |
This file contains hidden or 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
| SELECT table, | |
| formatReadableSize(sum(bytes)) as size, | |
| min(min_date) as min_date, | |
| max(max_date) as max_date | |
| FROM system.parts | |
| WHERE active | |
| GROUP BY table |
I tested this with gentoo, and docker with --experimental.
OVH vrack is a virtual rack for your dedicated server. You can get a whole ip subnet from ovh, which you can map to any of the host inside the vrack.
The dedicated server has second network device (eth1,eno2,…) which is connected to the vrack.
#Steps to install latest Laravel, LEMP on AWS Ubuntu 16.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.
Run the following commands in sequence.
sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip
This file contains hidden or 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
| function string.fromhex(str) | |
| return (str:gsub('..', function (cc) | |
| return string.char(tonumber(cc, 16)) | |
| end)) | |
| end | |
| function string.tohex(str) | |
| return (str:gsub('.', function (c) | |
| return string.format('%02X', string.byte(c)) | |
| end)) |
This file contains hidden or 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
| # Build dependencies for OpenResty. | |
| sudo apt-get install build-essential libpcre3-dev libssl-dev libgeoip-dev | |
| # Install standard Nginx first so that you get the relevant service scripts installed too | |
| sudo apt-get install nginx | |
| # If you want to access Postgres via Nginx | |
| sudo apt-get install libpq-dev |
NewerOlder