Skip to content
Snippets Groups Projects
Commit 4d266d21 authored by Hannes Feldt's avatar Hannes Feldt
Browse files

add basics

parent e2e8e07d
No related branches found
No related tags found
No related merge requests found
resource "network" "cloud" {
subnet = "10.10.0.0/16"
}
resource "nomad_cluster" "dev" {
network {
id = resource.network.cloud.meta.id
}
}
setup.sh 0 → 100755
#!/bin/bash
#
# Copyright (C) 2024 ASTRON (Netherlands Institute for Radio Astronomy)
# SPDX-License-Identifier: Apache-2.0
#
# Url to the jumppad download location
jumppad_download="https://github.com/jumppad-labs/jumppad/releases/download/0.15.0/jumppad_0.15.0_linux_x86_64.tar.gz"
levant_download="https://releases.hashicorp.com/levant/0.3.3/levant_0.3.3_linux_amd64.zip"
mkdir -p ./.bin
bin_dir=$(realpath ./.bin)
export PATH="$PATH:$bin_dir"
echo 'Check if jumppad is installed'
if ! [ -x "$(command -v jumppad)" ]; then
echo 'jumppad is not installed, installing'
mkdir -p ./.bin
wget -qO- "${jumppad_download}" | tar xvfz - -C "$bin_dir"
chmod +x ./.bin/jumppad
fi
echo 'Check if levant is installed'
if ! [ -x "$(command -v levant)" ]; then
echo 'levant is not installed, installing'
mkdir -p ./.bin
wget -qO- "${levant_download}" | zcat >> ./.bin/levant
chmod +x ./.bin/levant
fi
job "example" {
group "test" {
task "alpine" {
driver = "docker"
config {
image = "alpine:latest"
command = "sh"
args = ["-c", "while true; do sleep 300; done "]
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment