Skip to content
This repository was archived by the owner on Jan 21, 2020. It is now read-only.

Commit 3ab2ec5

Browse files
author
David Chung
authored
playbook for packet remote ipxe boot (#537)
Signed-off-by: David Chung <[email protected]>
1 parent 64defd0 commit 3ab2ec5

17 files changed

+201
-22
lines changed
File renamed without changes.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Provision a single instance
2+
run-instance : provision-instance.ikt
3+
4+
# Manage a group of nodes
5+
scale-group : scale-group.ikt
6+
7+
# List instances
8+
list-instances : list-instances.sh
9+
10+
# Destroy all
11+
destroy-all : destroy-instances.sh
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/playbooks/linuxkit/examples/sshd/index.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,11 @@
22

33
build-image : build-image.sh
44

5-
# Provision a single instance
6-
run-instance : provision-instance.ikt
7-
8-
# Manage a group of nodes
9-
scale-group : scale-group.ikt
10-
11-
# List instances
12-
list-instances : list-instances.sh
13-
145
# Inspect global state
156
inspect : inspect.sh
167

17-
# Destroy all
18-
destroy-all : destroy-instances.sh
8+
# hyperkit commands
9+
hyperkit : hyperkit/index.yml
10+
11+
# packet commands
12+
packet : packet/index.yml
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{{/* =% sh %= */}}
2+
3+
{{ $plugin := flag "instance-plugin" "string" "Name of plugin" | prompt "What instance plugin to target?" "string" "instance-packet" }}
4+
5+
infrakit instance --name {{ $plugin }} describe -q | awk '{print $1}' | xargs infrakit instance --name {{ $plugin }} destroy
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Provision a single instance
2+
run-instance : provision-instance.ikt
3+
4+
# Manage a group of nodes
5+
scale-group : scale-group.ikt
6+
7+
# List instances
8+
list-instances : list-instances.sh
9+
10+
# Destroy all
11+
destroy-all : destroy-instances.sh
12+
13+
# Serve up the image. Uses local ngrok to tunnel
14+
serve-image: serve-image.sh
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{{/* =% sh %= */}}
2+
3+
infrakit instance --name instance-packet describe
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{{/* Input to create instance using the Packet instance plugin */}}
2+
{{/* =% instanceProvision "instance-packet" true %= */}}
3+
4+
{{ $project := var "/project" | flag "project" "string" "Project name" | prompt "Project?" "string" "myproject" }}
5+
6+
{{ $linuxkitPath := flag "bundle-path" "string" "Bundle directory" | prompt "Bundle directory?" "string" (env "PWD") }}
7+
{{ $bundle := flag "bundle" "string" "Bundle prefix" | prompt "Bundle prefix?" "string" "sshd"}}
8+
{{ $baseURL := flag "base-url" "string" "Base URL" | prompt "Base URL (from upload or ngrok)?" "string" "https://76c08e79.ngrok.io" }}
9+
{{ $facility := flag "facility" "string" "Facility" | prompt "Facility?" "string" "sjc1" }}
10+
{{ $checksum := fetch (cat "file://" $linuxkitPath "/" $bundle "-initrd.img" | nospace) | sha256sum }}
11+
12+
Tags:
13+
infrakit.created: {{ now | htmlDate }}
14+
infrakit.project: {{ $project }}
15+
infrakit.checksum: {{ $checksum }}
16+
17+
Properties:
18+
plan: baremetal_0
19+
facility: {{ $facility }}
20+
operating_system: custom_ipxe
21+
billing_cycle: hourly
22+
userdata: |
23+
#!ipxe
24+
25+
dhcp
26+
set base-url {{ $baseURL }}
27+
set kernel-params ip=dhcp nomodeset ro serial console=ttyS1,115200
28+
kernel ${base-url}/{{$bundle}}-kernel ${kernel-params}
29+
initrd ${base-url}/{{$bundle}}-initrd.img
30+
boot
31+
hostname_prefix: infrakit-test
32+
checksum: {{ $checksum }}

0 commit comments

Comments
 (0)