parent
a1a43c9667
commit
b8a417b2ef
@ -1,22 +1,29 @@
|
||||
1. Copy config-example.json to config.json and modify with your desired layout.
|
||||
This is the core config file for the web console, agent, and server. Config.json should be copied to the picluster directory on each node.
|
||||
|
||||
You can run the server and agent on the same node since they are listening on different ports.
|
||||
|
||||
```You can run the server and agent on the same node since they are listening on different ports.
|
||||
```
|
||||
2. Copy the example Dockerfile layout depending on architecture (Optional)
|
||||
Arch Linux ARM
|
||||
|
||||
```
|
||||
cd /opt/picluster
|
||||
cp -r example/arm/archlinux/* docker/
|
||||
x86_64 Ubuntu x86_64
|
||||
|
||||
```
|
||||
```
|
||||
cd /opt/picluster
|
||||
cp -r example/x86_64/ubuntu/* docker/
|
||||
```
|
||||
|
||||
An example of the Docker folder layout:
|
||||
Based on the config snippet below, I have two container images that will be called "mysql" and "nginx" that will run on host 192.168.0.100.
|
||||
|
||||
```
|
||||
"layout": [
|
||||
{"node":"192.168.0.100", "mysql":"-p 3306:3306","nginx":"-p 80:80"}
|
||||
```
|
||||
|
||||
The Docker folder will need to be setup like this to match the container names:
|
||||
|
||||
/root/docker/mysql/Dockerfile
|
||||
@ -25,19 +32,23 @@ When it is time to build the containers, PiCluster will use the "docker" variabl
|
||||
|
||||
Server Installation
|
||||
The server is the brain of PiCluster and the agents and web console connect to it.
|
||||
|
||||
```
|
||||
cd server
|
||||
npm install
|
||||
node server.js
|
||||
Agent Installation
|
||||
```
|
||||
#### Agent Installation
|
||||
The server will send commands to be executed on the agents nodes. The agent should be installed on each host in the cluster.
|
||||
|
||||
```
|
||||
cd agent
|
||||
npm install
|
||||
node agent.js
|
||||
Web Console Installation
|
||||
```
|
||||
#### Web Console Installation
|
||||
The web console will send commands to the server that will run commands or gather information from the agent nodes.
|
||||
|
||||
```
|
||||
cd web
|
||||
npm install
|
||||
node webconsole.js
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user