Skip to content

Great-Stone/various-workloads-on-nomad

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run Nomad via Vagrant

Vagrant Download

  • vagrant up on nomad-server
    • replace ip script.sh and nomad.d/*.hcl
    • if changing IP, vagrant reload --provision
  • vagrant up on nomad-client
    • replace ip script.sh and nomad.d/*.hcl
    • if changing IP, vagrant reload --provision
  • Check the UI
    • Nomad UI - http://[nomad-server]:4646
    • Consul UI - http://[nomad-server]:8500

Set-up

  • Create a S3 Bucket
  • Replace s3://gs-mysql-dump/ to your bucket name in the dump-mysql.sh, init.sh, and periodic-backup.hcl.

Demo

  • nomad job run mysql.hcl
    • when the first time,
      • mysql -h ${MYSQL_HOST} -u root -prooooot -D handson -e "drop table if exists animals"
      • mysql -h ${MYSQL_HOST} -u root -prooooot -D handson -e "create table animals (animal varchar(100));"
  • nomad job run ui-java.hcl
    • Open the browser. http://[nomad-client]:8080/
  • ./insert-dog.sh
  • nomad job run parameterized-toupper.hcl
  • echo "cat" | nomad job dispatch r2-parameterized-toUpper -
  • nomad job run front-api-go.hcl
  • curl [nomad-client]:8888/animal/pig
  • nomad job run periodic-backup.hcl
  • nomad job run periodic-curl.hcl

Clean-up

  • ./init.sh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 38.3%
  • HCL 34.9%
  • HTML 9.8%
  • Java 9.3%
  • Go 7.7%