Skip to content

Commit

Permalink
v0.3.1, minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Neutrollized committed Sep 22, 2023
1 parent c34bbbf commit 5c90d39
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 4 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [0.3.1] - 2023-09-22
### Added
- Separate "services check" scripts for Nomad servers and clients
### Changed
- Updated Consul version from `1.16.1` to `1.16.2`

## [0.3.0] - 2023-09-18
### Added
- `required_plugins` added to template as [Packer plugins](https://developer.hashicorp.com/packer/docs/plugins) will be standalone in future releases of Packer
### Changed
- Updated Packer version from `1.9.2` to `1.9.4`
- Updated Nomad version from `1.6.0` to `1.6.2`
- Updated Consul version from `1.16.0` to `1.16.1`

## [0.2.2] - 2023-07-20
### Changed
Expand Down
8 changes: 8 additions & 0 deletions hashistack/nomad/20_client_services_check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CONSUL_SVC=$(systemctl status consul | grep 'Active:' | awk -F': ' '{$1=""; print $0}' | awk -F';' '{print $1}' | xargs)
NOMAD_SVC=$(systemctl status nomad | grep 'Active:' | awk -F': ' '{$1=""; print $0}' | awk -F';' '{print $1}' | xargs)
DOCKER_SVC=$(systemctl status docker | grep 'Active:' | awk -F': ' '{$1=""; print $0}' | awk -F';' '{print $1}' | xargs)

echo -e "===== SERVICES ===============================================================
$COLOR_COLUMN- consul$RESET_COLORS.............: $COLOR_VALUE ${CONSUL_SVC}$RESET_COLORS
$COLOR_COLUMN- nomad$RESET_COLORS..............: $COLOR_VALUE ${NOMAD_SVC}$RESET_COLORS
$COLOR_COLUMN- docker$RESET_COLORS.............: $COLOR_VALUE ${DOCKER_SVC}$RESET_COLORS"
File renamed without changes.
6 changes: 6 additions & 0 deletions hashistack/nomad_client.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ build {
max_retries = 3
}

provisioner "file" {
source = "nomad/20_client_services_check.sh"
destination = "/tmp/"
}

provisioner "file" {
source = "nomad/nomad.service"
destination = "/tmp/"
Expand All @@ -139,6 +144,7 @@ build {
"echo '=============================================='",
"echo 'SETUP NOMAD CLIENT'",
"echo '=============================================='",
"sudo mv /tmp/20_client_services_check.sh /etc/dynmotd.d/20_services_check.sh",
"sudo mv /tmp/nomad.service /etc/systemd/system/",
"sudo systemctl daemon-reload",
"sudo mv /tmp/client.hcl /etc/nomad.d/",
Expand Down
4 changes: 2 additions & 2 deletions hashistack/nomad_server.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ build {
}

provisioner "file" {
source = "nomad/20_services_check.sh"
source = "nomad/20_server_services_check.sh"
destination = "/tmp/"
}

Expand All @@ -92,7 +92,7 @@ build {
"echo '=============================================='",
"echo 'SETUP NOMAD SERVER'",
"echo '=============================================='",
"sudo mv /tmp/20_services_check.sh /etc/dynmotd.d/",
"sudo mv /tmp/20_server_services_check.sh /etc/dynmotd.d/20_services_check.sh",
"sudo mv /tmp/nomad.service /etc/systemd/system/",
"sudo systemctl daemon-reload",
"sudo mv /tmp/server.hcl /etc/nomad.d/",
Expand Down
2 changes: 1 addition & 1 deletion hashistack/variables.pkrvars.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
zone = "northamerica-northeast2-c"
arch = "amd64"

consul_version = "1.16.1"
consul_version = "1.16.2"
nomad_version = "1.6.2"

0 comments on commit 5c90d39

Please sign in to comment.