Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ release set. Override individual selectors with
`runtime.sitectl.package_versions` when intentionally testing or promoting a
different compatible release set.

All non-ISLE presets use the coordinated sitectl v1.0.0 core/plugin release.
ISLE intentionally remains on its last released compatibility set—sitectl
v0.40.0, sitectl-drupal v0.12.0, and sitectl-isle v0.19.0—until its remaining
components are ready for a coordinated v1 release. Keep ISLE on that complete
set rather than mixing its pre-v1 plugin with v1 packages.

GCP deployments have two Terraform ownership layers. Apply
[`modules/gcp-foundation`](modules/gcp-foundation/README.md) once per service
project from a small, long-lived state; it owns required APIs, the Cloud Run
Expand Down
13 changes: 9 additions & 4 deletions ci/config-management-smoke-inner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ assert env["SITECTL_PLUGIN"] == "isle"
assert "sitectl-isle" in env["SITECTL_PACKAGES"].split()
assert json.loads(env["SITECTL_PACKAGE_VERSIONS"]) == {
"sitectl": "v0.40.0",
"sitectl-drupal": "v0.11.0",
"sitectl-isle": "v0.12.0",
"sitectl-drupal": "v0.12.0",
"sitectl-isle": "v0.19.0",
}
assert project["docker_compose_repo"] == "https://github.com/libops/isle"
assert project["project_dir"] == "/mnt/disks/data/libops/isle/main"
Expand Down Expand Up @@ -447,8 +447,8 @@ assert Path(expected_project_dir).is_dir()

if expected_name == "wp-prod":
assert json.loads(env["SITECTL_PACKAGE_VERSIONS"]) == {
"sitectl": "v0.40.0",
"sitectl-wp": "v0.10.0",
"sitectl": "v1.0.0",
"sitectl-wp": "v1.0.0",
}
assert "BASH_ENV" not in env
assert "LD_PRELOAD" not in env
Expand All @@ -474,6 +474,11 @@ if expected_name == "wp-prod":
assert "\t/usr/local/bin/contract-agent\t0750\troot\troot\tcloud-compose.service" in artifact_manifest
assert not Path("/tmp/cloud-compose-salt-backtick-injection").exists()
assert not Path("/tmp/cloud-compose-salt-command-injection").exists()
elif expected_name == "drupal-prod":
assert json.loads(env["SITECTL_PACKAGE_VERSIONS"]) == {
"sitectl": "v1.0.0",
"sitectl-drupal": "v1.0.0",
}

for path in [
"/home/cloud-compose/init",
Expand Down
11 changes: 9 additions & 2 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ healthcheck settings:
runtime = {
sitectl = {
package_versions = {
sitectl = "v0.40.0"
sitectl-wp = "v0.6.0"
sitectl = "v1.0.0"
sitectl-wp = "v1.0.0"
}
}
compose = {
Expand Down Expand Up @@ -173,6 +173,13 @@ runtime = {
}
}
}
sitectl = {
package_versions = {
sitectl = "v1.0.0"
sitectl-wp = "v1.0.0"
sitectl-drupal = "v1.0.0"
}
}
}
```

Expand Down
5 changes: 5 additions & 0 deletions docs/managed-runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ core and plugins independently. The provider-neutral
backward-compatible fallback only for an installed package with neither a
template selector nor an explicit per-package selector.

The ISLE preset is an intentional temporary exception to the v1 defaults. It
stays on sitectl v0.40.0, sitectl-drupal v0.12.0, and sitectl-isle v0.19.0 until
the remaining ISLE components can ship together as v1. Do not combine the
pre-v1 ISLE plugin with the v1 core or Drupal plugin.

Omitting `runtime.sitectl.packages` selects the template's package set. An
explicit list replaces that set; `packages = []` or `packages = ["sitectl"]`
selects the core CLI only. A per-project `sitectl_packages` value follows the
Expand Down
7 changes: 7 additions & 0 deletions examples/binpack/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,12 @@ module "apps" {
}
}
}
sitectl = {
package_versions = {
sitectl = "v1.0.0"
sitectl-wp = "v1.0.0"
sitectl-drupal = "v1.0.0"
}
}
}
}
38 changes: 25 additions & 13 deletions internal/contracttest/template_version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,36 +29,38 @@ func TestTemplateVersionContract(t *testing.T) {

expectedVersions := map[string]map[string]string{
"default": {
"sitectl": "v0.40.0",
"sitectl": "v1.0.0",
},
"archivesspace": {
"sitectl": "v0.40.0",
"sitectl-archivesspace": "v0.7.0",
"sitectl": "v1.0.0",
"sitectl-archivesspace": "v1.0.0",
},
"drupal": {
"sitectl": "v0.40.0",
"sitectl-drupal": "v0.12.0",
"sitectl": "v1.0.0",
"sitectl-drupal": "v1.0.0",
},
// ISLE remains on its last released pre-v1 compatibility set until
// the outstanding ISLE components are ready for a coordinated v1.
"isle": {
"sitectl": "v0.40.0",
"sitectl-drupal": "v0.12.0",
"sitectl-isle": "v0.19.0",
},
"ojs": {
"sitectl": "v0.40.0",
"sitectl-ojs": "v0.7.0",
"sitectl": "v1.0.0",
"sitectl-ojs": "v1.0.0",
},
"omeka-classic": {
"sitectl": "v0.40.0",
"sitectl-omeka-classic": "v0.7.0",
"sitectl": "v1.0.0",
"sitectl-omeka-classic": "v1.0.0",
},
"omeka-s": {
"sitectl": "v0.40.0",
"sitectl-omeka-s": "v0.7.0",
"sitectl": "v1.0.0",
"sitectl-omeka-s": "v1.0.0",
},
"wp": {
"sitectl": "v0.40.0",
"sitectl-wp": "v0.6.0",
"sitectl": "v1.0.0",
"sitectl-wp": "v1.0.0",
},
}

Expand Down Expand Up @@ -121,4 +123,14 @@ func TestTemplateVersionContract(t *testing.T) {
requireContains(t, content, "package_versions = merge(local.template_sitectl_package_versions, local.input_sitectl.package_versions)", relativePath+" explicit package-version override")
requireContains(t, content, "local.input_sitectl.packages == null ? local.template.packages : local.input_sitectl.packages", relativePath+" omitted-package handling")
}

for _, relativePath := range []string{"examples/binpack/main.tf", "docs/examples.md"} {
content := readRepositoryFile(t, root, relativePath)
for _, packageName := range []string{"sitectl", "sitectl-wp", "sitectl-drupal"} {
requireContains(t, content, packageName, relativePath+" bin-pack package")
}
requireContains(t, content, `sitectl = "v1.0.0"`, relativePath+" bin-pack core selector")
requireContains(t, content, `sitectl-wp = "v1.0.0"`, relativePath+" bin-pack WordPress selector")
requireContains(t, content, `sitectl-drupal = "v1.0.0"`, relativePath+" bin-pack Drupal selector")
}
}
55 changes: 54 additions & 1 deletion template_versions.tftest.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,60 @@ mock_provider "google" {
}
mock_provider "time" {}

run "template_uses_released_package_set" {
run "default_template_uses_v1_core" {
command = plan

variables {
name = "template-versions"
cloud_provider = "gcp"
gcp = {
project_id = "test-project"
project_number = "123456789"
}
runtime = {
rootfs_archive_url = "https://example.invalid/cloud-compose.tar.gz"
rootfs_archive_sha256 = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
compose = {
repo = "https://github.com/libops/wp.git"
}
}
}

assert {
condition = local.sitectl.package_versions == {
sitectl = "v1.0.0"
}
error_message = "The default template must select the released sitectl v1 core."
}
}

run "non_isle_template_uses_v1_release_set" {
command = plan

variables {
name = "template-versions"
cloud_provider = "gcp"
template = "wp"
gcp = {
project_id = "test-project"
project_number = "123456789"
}
runtime = {
rootfs_archive_url = "https://example.invalid/cloud-compose.tar.gz"
rootfs_archive_sha256 = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
}

assert {
condition = local.sitectl.package_versions == {
sitectl = "v1.0.0"
sitectl-wp = "v1.0.0"
}
error_message = "Non-ISLE templates must select their coordinated sitectl v1 release set."
}
}

run "isle_template_uses_released_pre_v1_package_set" {
command = plan

variables {
Expand Down
26 changes: 13 additions & 13 deletions templates/apps.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"plugin": "core",
"packages": ["sitectl"],
"package_versions": {
"sitectl": "v0.40.0"
"sitectl": "v1.0.0"
}
},
"templates": {
Expand All @@ -15,8 +15,8 @@
"plugin": "archivesspace",
"packages": ["sitectl", "sitectl-archivesspace"],
"package_versions": {
"sitectl": "v0.40.0",
"sitectl-archivesspace": "v0.7.0"
"sitectl": "v1.0.0",
"sitectl-archivesspace": "v1.0.0"
}
},
"ojs": {
Expand All @@ -25,8 +25,8 @@
"plugin": "ojs",
"packages": ["sitectl", "sitectl-ojs"],
"package_versions": {
"sitectl": "v0.40.0",
"sitectl-ojs": "v0.7.0"
"sitectl": "v1.0.0",
"sitectl-ojs": "v1.0.0"
}
},
"isle": {
Expand All @@ -46,8 +46,8 @@
"plugin": "drupal",
"packages": ["sitectl", "sitectl-drupal"],
"package_versions": {
"sitectl": "v0.40.0",
"sitectl-drupal": "v0.12.0"
"sitectl": "v1.0.0",
"sitectl-drupal": "v1.0.0"
}
},
"wp": {
Expand All @@ -56,8 +56,8 @@
"plugin": "wp",
"packages": ["sitectl", "sitectl-wp"],
"package_versions": {
"sitectl": "v0.40.0",
"sitectl-wp": "v0.6.0"
"sitectl": "v1.0.0",
"sitectl-wp": "v1.0.0"
}
},
"omeka-s": {
Expand All @@ -66,8 +66,8 @@
"plugin": "omeka-s",
"packages": ["sitectl", "sitectl-omeka-s"],
"package_versions": {
"sitectl": "v0.40.0",
"sitectl-omeka-s": "v0.7.0"
"sitectl": "v1.0.0",
"sitectl-omeka-s": "v1.0.0"
}
},
"omeka-classic": {
Expand All @@ -76,8 +76,8 @@
"plugin": "omeka-classic",
"packages": ["sitectl", "sitectl-omeka-classic"],
"package_versions": {
"sitectl": "v0.40.0",
"sitectl-omeka-classic": "v0.7.0"
"sitectl": "v1.0.0",
"sitectl-omeka-classic": "v1.0.0"
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions tests/config-management/ansible/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@
sitectl:
environment: production
package_versions:
sitectl-drupal: v0.11.0
sitectl-isle: v0.12.0
sitectl: v0.40.0
sitectl-drupal: v0.12.0
sitectl-isle: v0.19.0
managed_runtime:
enabled: false
internal_services_enabled: false
Expand Down
3 changes: 2 additions & 1 deletion tests/config-management/salt-pillar/wp-prod.sls
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ cloud_compose:
sitectl:
environment: production
package_versions:
sitectl-wp: v0.10.0
sitectl: v1.0.0
sitectl-wp: v1.0.0
managed_runtime:
enabled: false
internal_services_enabled: false
Expand Down