-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Minor fix to dockerfile * Reorganise deployment Use different dirs for each component with the terraform specifics, try to have common parts without duplication * Image syncing * Improve deployment * Make sure we have CAs in the right place * Adjust device * Add the images to the schema * Add image sync to WALTON * Improved role * Ignore hadolint issue * New ADR for image sync * Fine tune deployment * Update README * Debug * Fix deployment call * Do not debug here * Remove site configuration that we are not using * Improve text * Moved repo to EGI-Federation * Improve building image
- Loading branch information
Showing
37 changed files
with
624 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
name: 'Deploy cloud-info' | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
paths: | ||
- "deploy/**" | ||
|
||
jobs: | ||
deploy: | ||
uses: ./.github/workflows/deploy.yml | ||
with: | ||
dir: "deploy/cloud-info" | ||
tags: "cloud-info,docker" | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
name: 'Deploy image sync' | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
paths: | ||
- "deploy/**" | ||
|
||
jobs: | ||
deploy: | ||
uses: ./.github/workflows/deploy.yml | ||
with: | ||
dir: "deploy/image-sync" | ||
tags: "docker,image-sync" | ||
secrets: inherit | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM python:3 as build | ||
FROM python:3 AS build | ||
|
||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
|
||
|
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Network | ||
net_id = "f15a0e1f-570e-4135-9739-a59b8c2b3e8e" | ||
|
||
# Flavor: svc1.m 2cores/4GB RAM | ||
flavor_id = "737f8483-8063-4567-a8e5-e09a4bcbdb49" | ||
|
||
# Image: ubuntu 22.04 | ||
image_id = "966f2e5a-7b48-4cb2-be92-6e2132413cf2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# This is where the info about the deployment is to be stored | ||
terraform { | ||
backend "swift" { | ||
container = "terraform-image-sync" | ||
cloud = "backend" | ||
} | ||
} | ||
|
||
# The provider where the deployment is actually performed | ||
provider "openstack" { | ||
cloud = "deploy" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Disk layout | ||
disk_setup: | ||
/dev/sdb: | ||
table_type: 'mbr' | ||
layout: true | ||
overwrite: false | ||
fs_setup: | ||
- filesystem: ext4 | ||
device: /dev/sdb | ||
partition: any | ||
overwrite: false | ||
mounts: | ||
- [ /dev/sdb, /var/cache/image-sync ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
resource "openstack_blockstorage_volume_v3" "image-cache" { | ||
name = "image-cache" | ||
size = 200 | ||
} | ||
|
||
resource "openstack_compute_instance_v2" "image-sync" { | ||
name = "image-sync" | ||
image_id = var.image_id | ||
flavor_id = var.flavor_id | ||
security_groups = ["default"] | ||
user_data = file("cloud-init.yaml") | ||
network { | ||
uuid = var.net_id | ||
} | ||
} | ||
|
||
resource "openstack_compute_volume_attach_v2" "attached" { | ||
instance_id = openstack_compute_instance_v2.image-sync.id | ||
volume_id = openstack_blockstorage_volume_v3.image-cache.id | ||
} | ||
|
||
|
||
|
||
output "instance-id" { | ||
value = openstack_compute_instance_v2.image-sync.id | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
variable "net_id" { | ||
type = string | ||
description = "The id of the network" | ||
} | ||
|
||
variable "image_id" { | ||
type = string | ||
description = "VM image id" | ||
} | ||
|
||
variable "flavor_id" { | ||
type = string | ||
description = "VM flavor id" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
terraform { | ||
required_providers { | ||
openstack = { | ||
source = "terraform-provider-openstack/openstack" | ||
version = "~> 1.48" | ||
} | ||
} | ||
required_version = ">= 0.13" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.