Skip to content

Commit eb9df85

Browse files
Merge pull request #307 from jumppad-labs/f-erik-and-his-bugs
Updated to use latest HCL config, and docker images
2 parents faa7cfe + ed86e48 commit eb9df85

File tree

9 files changed

+30
-15
lines changed

9 files changed

+30
-15
lines changed

.github/workflows/build_and_deploy.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
dagger-flags: "--progress=plain"
3232

3333
- name: Upload artifacts
34-
uses: actions/upload-artifact@v2
34+
uses: actions/upload-artifact@v4
3535
with:
3636
name: archives
3737
path: |
@@ -70,7 +70,7 @@ jobs:
7070

7171
steps:
7272
- name: Download-Binaries
73-
uses: actions/download-artifact@v2
73+
uses: actions/download-artifact@v4
7474
with:
7575
name: archives
7676
path: ./build_artifacts
@@ -124,7 +124,7 @@ jobs:
124124

125125
steps:
126126
- name: Download-Binaries
127-
uses: actions/download-artifact@v2
127+
uses: actions/download-artifact@v4
128128
with:
129129
name: archives
130130
path: ./build_artifacts
@@ -174,7 +174,7 @@ jobs:
174174
- uses: actions/checkout@v2
175175

176176
- name: Download-Binaries
177-
uses: actions/download-artifact@v2
177+
uses: actions/download-artifact@v4
178178
with:
179179
name: archives
180180
path: ./build_artifacts

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,8 @@ generate_mocks:
5454

5555
install_local:
5656
go build -ldflags "-X main.version=${git_commit}" -gcflags=all="-N -l" -o bin/jumppad main.go
57-
sudo mv /usr/local/bin/jumppad /usr/local/bin/jumppad-old || true
58-
sudo cp bin/jumppad /usr/local/bin/jumppad
57+
sudo mv /usr/bin/jumppad /usr/bin/jumppad-old || true
58+
sudo cp bin/jumppad /usr/bin/jumppad
59+
60+
remove_local:
61+
sudo mv /usr/bin/jumppad-old /usr/bin/jumppad || true

examples/build/test/build.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Scenario: Build Image and Create Docker Container
1414
Then the following resources should be running
1515
| name |
1616
| module.container.resource.container.app |
17-
And a HTTP call to "http://app.local.jumppad.dev:19090/" should result in status 200
17+
And a HTTP call to "http://app.local.jmpd.in:19090/" should result in status 200
1818

1919
Scenario: Build Image and Load to Nomad Cluster
2020
Given the following jumppad variables are set
@@ -27,7 +27,7 @@ Scenario: Build Image and Load to Nomad Cluster
2727
Then the following resources should be running
2828
| name |
2929
| module.nomad.resource.nomad_cluster.dev |
30-
And a HTTP call to "http://app.local.jumppad.dev:19090/" should result in status 200
30+
And a HTTP call to "http://app.local.jmpd.in:19090/" should result in status 200
3131

3232
Scenario: Build Image and Load to Kubernetes Cluster
3333
Given the following jumppad variables are set
@@ -40,4 +40,4 @@ Scenario: Build Image and Load to Kubernetes Cluster
4040
Then the following resources should be running
4141
| name |
4242
| module.kubernetes.resource.k8s_cluster.dev |
43-
And a HTTP call to "http://app.local.jumppad.dev:19090/" should result in status 200
43+
And a HTTP call to "http://app.local.jmpd.in:19090/" should result in status 200

examples/container/container.hcl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ resource "container" "consul" {
112112
memory = 1024
113113
}
114114

115+
port {
116+
local = 8507
117+
remote = 8507
118+
}
119+
115120
port_range {
116121
range = "8500-8502"
117122
enable_host = true
@@ -147,6 +152,10 @@ resource "sidecar" "envoy" {
147152
name = "envoyproxy/envoy:v${variable.envoy_version}"
148153
}
149154

155+
environment = {
156+
PORT = "${resource.container.consul.port.0.local}"
157+
}
158+
150159
command = ["tail", "-f", "/dev/null"]
151160

152161
volume {

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ require (
3636
github.com/infinytum/raymond/v2 v2.0.5
3737
github.com/jumppad-labs/connector v0.4.0
3838
github.com/jumppad-labs/gohup v0.4.0
39-
github.com/jumppad-labs/hclconfig v0.24.0
39+
github.com/jumppad-labs/hclconfig v0.25.0
4040
github.com/jumppad-labs/plugin-sdk v0.1.1-0.20240306185853-c09f71f81b8a
4141
github.com/kennygrant/sanitize v1.2.4
4242
github.com/mattn/go-isatty v0.0.20

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,8 @@ github.com/jumppad-labs/gohup v0.4.0 h1:0OplHvnKnOLkqWm417sRHLSiJ4xGeb8LiSSAJ51Q
692692
github.com/jumppad-labs/gohup v0.4.0/go.mod h1:JYvZnemxJlWDyx8RbDNcCBLZSvIrYlYLnkQqR1BKFW4=
693693
github.com/jumppad-labs/hclconfig v0.24.0 h1:SyMCl2rwLC5o32CCp50fsVbJxyFFCiYoMejvfh9RJKM=
694694
github.com/jumppad-labs/hclconfig v0.24.0/go.mod h1:AOzW0btnKiqUKYVi3ioGzSPNCWsTzsJxKcqzVORccvk=
695+
github.com/jumppad-labs/hclconfig v0.25.0 h1:CRIprG+i+Ol9s2izb6PRrt23kyGYZ1OC/XGFqdI1o/M=
696+
github.com/jumppad-labs/hclconfig v0.25.0/go.mod h1:AOzW0btnKiqUKYVi3ioGzSPNCWsTzsJxKcqzVORccvk=
695697
github.com/jumppad-labs/log v0.0.0-20240827082827-4404884e31a7 h1:tuoFYWXAqT5BheDlQNumY1DxvkW8bjG9JOzoxpFneZs=
696698
github.com/jumppad-labs/log v0.0.0-20240827082827-4404884e31a7/go.mod h1:S9jhxE2C1+jv2PlLTAow3h+ZILzvXRhd6eBjFAUcfgI=
697699
github.com/jumppad-labs/plugin-sdk v0.1.1-0.20240306185853-c09f71f81b8a h1:fqPvAO1o/6bUIm0fwEbXcUzUCng+GDlLmSMT/5oUJUE=

pkg/config/resources/k8s/provider_cluster.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,8 @@ func (p *ClusterProvider) createK3s(ctx context.Context) error {
419419
"--kube-proxy-arg=conntrack-max-per-core=0",
420420
disableArgs,
421421
fmt.Sprintf("--snapshotter=%s", snapShotter),
422-
fmt.Sprintf("--tls-san=%s", FQDN),
422+
fmt.Sprintf("--tls-san=%s", FQDN), // add the FQDN for the server
423+
fmt.Sprintf("--tls-san=%s", utils.GetDockerIP()), // add the docker host IP
423424
clusterToken,
424425
}
425426

pkg/config/resources/k8s/resource_cluster.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ type KubeConfig struct {
7474
ClientKey string `hcl:"client_key" json:"client_key"` // base64 encoded client key
7575
}
7676

77-
const k3sBaseImage = "shipyardrun/k3s"
78-
const k3sBaseVersion = "v1.27.4"
77+
const k3sBaseImage = "ghcr.io/jumppad-labs/kubernetes"
78+
const k3sBaseVersion = "v1.31.1"
7979

8080
func (k *Cluster) Process() error {
8181
if k.APIPort == 0 {

pkg/config/resources/nomad/resource_cluster.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ type NomadCluster struct {
6161
ExternalIP string `hcl:"external_ip,optional" json:"external_ip,omitempty"`
6262
}
6363

64-
const nomadBaseImage = "shipyardrun/nomad"
65-
const nomadBaseVersion = "1.7.5"
64+
const nomadBaseImage = "ghcr.io/jumppad-labs/nomad"
65+
const nomadBaseVersion = "v1.8.4"
6666

6767
type Config struct {
6868
// Specifies configuration for the Docker driver.

0 commit comments

Comments
 (0)