Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
f07e3d8d72 | |||
ee945b31c9 | |||
ce7a79b75d | |||
e8ffd43a29 | |||
b385de2b5a | |||
9dc63fbdb6 | |||
60270f3164 | |||
68c334307c | |||
be40a7b371 | |||
b504810679 | |||
7acaae68b4 | |||
0cb5e79447 | |||
64cc641150 | |||
3a5445e583 | |||
2499b89fe6 | |||
22f6f22012 | |||
5b7ce84149 | |||
92ea28a0ad |
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
# Use Unix line endings for scripts
|
||||
*.sh text eol=lf
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
envrc
|
||||
out
|
||||
.env
|
||||
|
@ -14,7 +14,7 @@ is running the hood. Sandbox runs a pinned version for all the components via
|
||||
commit sha. In this way as a user you won't be effected (ideally) from new code
|
||||
that will may change a bit how Tinkerbell works.
|
||||
|
||||
We are keeping the number of bc break as low as possible but in the current
|
||||
We are keeping the number of breaking changes as low as possible but in the current
|
||||
state they are expected.
|
||||
|
||||
## Binary release
|
||||
|
@ -88,7 +88,7 @@ func main() {
|
||||
}
|
||||
if arch.Platform.Variant != "" {
|
||||
syss.VariantChoice = arch.Platform.Variant
|
||||
imgDir = imgDir + "-" + arch.Platform.Variant
|
||||
imgDir = imgDir + arch.Platform.Variant
|
||||
}
|
||||
archImg, err := docker.ImageFromName(ctx, syss, imageR)
|
||||
if err != nil {
|
||||
|
@ -4,9 +4,9 @@
|
||||
# automation that needs to get the version of the programs currently supported
|
||||
# in sandbox
|
||||
|
||||
export OSIE_DOWNLOAD_LINK=https://tinkerbell-oss.s3.amazonaws.com/osie-uploads/osie-v0-n=366,c=1aec189,b=master.tar.gz
|
||||
export TINKERBELL_TINK_SERVER_IMAGE=quay.io/tinkerbell/tink:sha-0e8e5733
|
||||
export TINKERBELL_TINK_CLI_IMAGE=quay.io/tinkerbell/tink-cli:sha-0e8e5733
|
||||
export TINKERBELL_TINK_BOOTS_IMAGE=quay.io/tinkerbell/boots:sha-45a64dad
|
||||
export TINKERBELL_TINK_HEGEL_IMAGE=quay.io/tinkerbell/hegel:sha-c17b512f
|
||||
export TINKERBELL_TINK_WORKER_IMAGE=quay.io/tinkerbell/tink-worker:sha-0e8e5733
|
||||
export OSIE_DOWNLOAD_LINK="https://tinkerbell-oss.s3.amazonaws.com/osie-uploads/osie-v0-n=404,c=c35a5f8,b=master.tar.gz"
|
||||
export TINKERBELL_TINK_SERVER_IMAGE=quay.io/tinkerbell/tink:sha-57eb0efb
|
||||
export TINKERBELL_TINK_CLI_IMAGE=quay.io/tinkerbell/tink-cli:sha-57eb0efb
|
||||
export TINKERBELL_TINK_BOOTS_IMAGE=quay.io/tinkerbell/boots:sha-62ed4b82
|
||||
export TINKERBELL_TINK_HEGEL_IMAGE=quay.io/tinkerbell/hegel:sha-c8a68311
|
||||
export TINKERBELL_TINK_WORKER_IMAGE=quay.io/tinkerbell/tink-worker:sha-57eb0efb
|
||||
|
@ -1,76 +0,0 @@
|
||||
SET ROLE tinkerbell;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS hardware (
|
||||
id UUID UNIQUE
|
||||
, inserted_at TIMESTAMPTZ
|
||||
, deleted_at TIMESTAMPTZ
|
||||
, data JSONB
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_id ON hardware (id);
|
||||
CREATE INDEX IF NOT EXISTS idx_deleted_at ON hardware (deleted_at NULLS FIRST);
|
||||
CREATE INDEX IF NOT EXISTS idxgin_type ON hardware USING GIN (data JSONB_PATH_OPS);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS template (
|
||||
id UUID UNIQUE NOT NULL
|
||||
, name VARCHAR(200) NOT NULL
|
||||
, created_at TIMESTAMPTZ
|
||||
, updated_at TIMESTAMPTZ
|
||||
, deleted_at TIMESTAMPTZ
|
||||
, data BYTEA
|
||||
|
||||
CONSTRAINT CK_name CHECK (name ~ '^[a-zA-Z0-9_-]*$')
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_tid ON template (id);
|
||||
CREATE INDEX IF NOT EXISTS idx_tdeleted_at ON template (deleted_at NULLS FIRST);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS workflow (
|
||||
id UUID UNIQUE NOT NULL
|
||||
, template UUID NOT NULL
|
||||
, devices JSONB NOT NULL
|
||||
, created_at TIMESTAMPTZ
|
||||
, updated_at TIMESTAMPTZ
|
||||
, deleted_at TIMESTAMPTZ
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_wid ON workflow (id);
|
||||
CREATE INDEX IF NOT EXISTS idx_wdeleted_at ON workflow (deleted_at NULLS FIRST);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS workflow_state (
|
||||
workflow_id UUID UNIQUE NOT NULL
|
||||
, current_task_name VARCHAR(200)
|
||||
, current_action_name VARCHAR(200)
|
||||
, current_action_state SMALLINT
|
||||
, current_worker VARCHAR(200)
|
||||
, action_list JSONB
|
||||
, current_action_index int
|
||||
, total_number_of_actions INT
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_wfid ON workflow_state (workflow_id);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS workflow_event (
|
||||
workflow_id UUID NOT NULL
|
||||
, worker_id UUID NOT NULL
|
||||
, task_name VARCHAR(200)
|
||||
, action_name VARCHAR(200)
|
||||
, execution_time int
|
||||
, message VARCHAR(200)
|
||||
, status SMALLINT
|
||||
, created_at TIMESTAMPTZ
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_event ON workflow_event (created_at);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS workflow_worker_map (
|
||||
workflow_id UUID NOT NULL
|
||||
, worker_id UUID NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS workflow_data (
|
||||
workflow_id UUID NOT NULL
|
||||
, version INT
|
||||
, metadata JSONB
|
||||
, data JSONB
|
||||
);
|
@ -65,7 +65,6 @@ services:
|
||||
POSTGRES_PASSWORD: tinkerbell
|
||||
POSTGRES_USER: tinkerbell
|
||||
volumes:
|
||||
- ./db/tinkerbell-init.sql:/docker-entrypoint-initdb.d/tinkerbell-init.sql:ro
|
||||
- postgres_data:/var/lib/postgresql/data:rw
|
||||
ports:
|
||||
- 5432:5432
|
||||
|
@ -6,7 +6,12 @@ terraform {
|
||||
version = "~> 3.0.1"
|
||||
}
|
||||
null = {
|
||||
source = "hashicorp/null"
|
||||
source = "hashicorp/null"
|
||||
version = "~> 2.1.2"
|
||||
}
|
||||
template = {
|
||||
source = "hashicorp/template"
|
||||
version = "~> 2.1.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
8
setup.sh
8
setup.sh
@ -487,6 +487,12 @@ whats_next() (
|
||||
echo "$BLANK Follow the steps described in https://tinkerbell.org/examples/hello-world/ to say 'Hello World!' with a workflow."
|
||||
)
|
||||
|
||||
setup_nat() (
|
||||
iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
|
||||
iptables -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT
|
||||
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
|
||||
)
|
||||
|
||||
do_setup() (
|
||||
# perform some very rudimentary platform detection
|
||||
lsb_dist=$(get_distribution)
|
||||
@ -504,7 +510,7 @@ do_setup() (
|
||||
source "$ENV_FILE"
|
||||
|
||||
setup_networking "$lsb_dist" "$lsb_version"
|
||||
|
||||
setup_nat
|
||||
setup_osie
|
||||
generate_certificates
|
||||
setup_docker_registry
|
||||
|
Reference in New Issue
Block a user