diff --git a/Installation.md b/Installation.md new file mode 100644 index 0000000..8ceed33 --- /dev/null +++ b/Installation.md @@ -0,0 +1,43 @@ +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. + +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 +/root/docker/nginx/Dockerfile +When it is time to build the containers, PiCluster will use the "docker" variable from config.json plus the container name to locate and build the images. + +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 +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 +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