NOMAD- WINDOWS SETUP FOR DEPLOYMENT OF MICROSERVICE
Installation and setup NOMAD-Windows Server
Nomad documentation for Windows Server
Software Requirements-****(same for server & client)
Java, maven, nodejs, python, Nomad.
POC performed on 1 Server & 1 Client (Windows 2016 Server)
Server Side Configuration
1.Install Java, maven, nodejs, docker, Nomad, Consul. set environmental variables.
2.Download and extract Nomad & Consul in C:\drive and set the path in environmental variables.
3.In Nomad Folder create a folder with nomad.d in that need to create server.hcl and client.hcl.
Below are the files content of server.hcl and client.hcl.
server.hcl
# /etc/nomad.d/server.hcl
data_dir tends to be environment specific.
data_dir = "C:\nomad\data"
server {
enabled = true
bootstrap_expect = 3
}
client.hcl
log_level = "DEBUG"
data_dir = "c:\nomad\data"
name = "testnomadclient_1"
client {
enabled = true
server_join {
retry_join = ["172.16.10.1"]
retry_max = 3
retry_interval = "15s"
}
}
ports {
http = 5656
}
Steps to be performed after software installation on Nomad server:
sc.exe create "Nomad-Oasis" binPath="C:\Nomad\nomad.exe agent -dev -bind 0.0.0.0 -log-level "INFO" start= auto
C:\Tools\consul>start-consul.bat
Start--> ZOOKEEPER & KAFKA (Based on the zookeeper & Kafka Directory )
C:\Tools\kafka_2.11-1.1.0\bin\windows\zookeeper-server-start.bat C:\Tools\kafka_2.11-1.1.0\config\zookeeper.properties
C:\Tools\kafka_2.11-1.1.0\bin\windows\kafka-server-start.bat C:\Tools\kafka_2.11-1.1.0\config\server0.properties
Steps to be performed after software installation on Nomad Client:
Run Below Command from C:\Nomad (Location) to add node to the cluster.
nomad agent -config=c:\nomad\nomad.d\client.hcl
Run Zookeeper & KAFKA & Consul On Node
Consul:
C:\Tools\consul>start-consul.bat
Command inside .bat File
consul agent -dev -ui -client 0.0.0.0 -log-level warn -data-dir=/tmp/consul
Zookeeper:
C:\Tools\kafka_2.11-1.1.0\bin\windows\zookeeper-server-start.bat C:\Tools\kafka_2.11-1.1.0\config\zookeeper.properties
Kafka:
C:\Tools\kafka_2.11-1.1.0\bin\windows\kafka-server-start.bat C:\Tools\kafka_2.11-1.1.0\config\server0.properties
NOMAD-UI DASHBOARD
Consul deployment
Download consul &
Download kafka and save it in C:\Drive and set the path in Environment variable.
COMMAND
C:\Tools\consul\start-consul.bat
Kafka - Zookeeper Deployment
Download kafka and save C:\Drive and set the path in Environment variable
Start--> ZOOKEEPER & KAFKA (Based on the zookeeper & Kafka Directory )
COMMAND
C:\Tools\kafka_2.11-1.1.0\bin\windows\zookeeper-server-start.bat C:\Tools\kafka_2.11-1.1.0\config\zookeeper.properties
C:\Tools\kafka_2.11-1.1.0\bin\windows\kafka-server-start.bat C:\Tools\kafka_2.11-1.1.0\config\server0.properties
Microservices-deployment
STEPS TO DEPLOY SERVICES
Nomad JOB Deployment.
C:\Nomad(All Nomad Job files Stored )
microservice1.nomad,
microservice2.nomad,
microservice3.nomad,
microservice4.nomad,
microservice5.nomad,
microservice6.nomad
newconsul.nomad (consul configured as nomad job)
zoojob.nomad (Zookeeper configured as nomad Job)
kafkajob.nomad (Kafka Configured as nomad job)
Open CMD.and cd c:\nomad and to run a job following commands
Nomad job run microservice1.nomad
Nomad server members (to see list of servers(leader))
Nomad node list (to see list of nomad clients)
Pods are called as Allocations in NOMAD.
Nomad Log Directory
C:\Windows\Temp
KAFKA & Zookeeper Logs
C:\tmp
Comments
Post a Comment