Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build and deploy nginx image sidecar #6

Merged
merged 9 commits into from
Dec 5, 2024
Merged

Conversation

KyleOps
Copy link
Collaborator

@KyleOps KyleOps commented Dec 4, 2024

No description provided.

Copy link

github-actions bot commented Dec 4, 2024

Terraform Plan Output

Click to expand
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # helm_release.inferno will be updated in-place
  ~ resource "helm_release" "inferno" {
        id                         = "dev-inferno"
      ~ metadata                   = [
          - {
              - app_version    = "1.16.0"
              - chart          = "inferno-helmd"
              - first_deployed = 1731979780
              - last_deployed  = 1731979780
              - name           = "dev-inferno"
              - namespace      = "dev-inferno"
              - revision       = 1
              - values         = jsonencode(
                    {
                      - controller     = {
                          - enabled              = false
                          - ingressClass         = "nginx"
                          - ingressClassResource = {
                              - default = false
                              - enabled = true
                              - name    = "nginx"
                            }
                          - service              = {
                              - annotations = {
                                  - "service.beta.kubernetes.io/aws-load-balancer-type" = "nlb"
                                }
                            }
                        }
                      - externalDomain = "dev.inferno.hl7.org.au"
                      - inferno        = {
                          - externalValidatorUrl = null
                          - imageUrl             = "ghcr.io/hl7au/au-fhir-inferno:68270162fcc1997a9ffac63c78530921bf0f32cf"
                          - terminologyServer    = "https://tx.dev.hl7.org.au/fhir"
                        }
                      - postgresql     = {
                          - containerPorts = {
                              - postgresql = 5432
                            }
                          - enabled        = false
                          - externaldbhost = "(sensitive value)"
                          - global         = {
                              - postgresql = {
                                  - auth = {
                                      - database = "inferno"
                                      - password = "(sensitive value)"
                                      - username = "(sensitive value)"
                                    }
                                }
                            }
                        }
                    }
                )
              - version        = "0.2.0"
                # (1 unchanged attribute hidden)
            },
        ] -> (known after apply)
        name                       = "dev-inferno"
        # (26 unchanged attributes hidden)

      + set {
          + name  = "nginx.platformImageUri"
          + value = "ghcr.io/hl7au/au-fhir-inferno:8885d0c456d0fdfaa92a915410e54cd820adc0fc"
            # (1 unchanged attribute hidden)
        }

      - set_sensitive {
          # At least one attribute in this block is (or was) sensitive,
          # so its contents will not be displayed.
        }
      - set_sensitive {
          # At least one attribute in this block is (or was) sensitive,
          # so its contents will not be displayed.
        }
      - set_sensitive {
          # At least one attribute in this block is (or was) sensitive,
          # so its contents will not be displayed.
        }
      + set_sensitive {
          # At least one attribute in this block is (or was) sensitive,
          # so its contents will not be displayed.
        }
      + set_sensitive {
          # At least one attribute in this block is (or was) sensitive,
          # so its contents will not be displayed.
        }
      + set_sensitive {
          # At least one attribute in this block is (or was) sensitive,
          # so its contents will not be displayed.
        }

        # (2 unchanged blocks hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

Copy link

github-actions bot commented Dec 4, 2024

Terraform Plan Output

Click to expand
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # helm_release.inferno will be updated in-place
  ~ resource "helm_release" "inferno" {
        id                         = "dev-inferno"
      ~ metadata                   = [
          - {
              - app_version    = "1.16.0"
              - chart          = "inferno-helmd"
              - first_deployed = 1731979780
              - last_deployed  = 1733299605
              - name           = "dev-inferno"
              - namespace      = "dev-inferno"
              - revision       = 2
              - values         = jsonencode(
                    {
                      - controller     = {
                          - enabled              = false
                          - ingressClass         = "nginx"
                          - ingressClassResource = {
                              - default = false
                              - enabled = true
                              - name    = "nginx"
                            }
                          - service              = {
                              - annotations = {
                                  - "service.beta.kubernetes.io/aws-load-balancer-type" = "nlb"
                                }
                            }
                        }
                      - externalDomain = "dev.inferno.hl7.org.au"
                      - inferno        = {
                          - externalValidatorUrl = null
                          - imageUrl             = "ghcr.io/hl7au/au-fhir-inferno:68270162fcc1997a9ffac63c78530921bf0f32cf"
                          - terminologyServer    = "https://tx.dev.hl7.org.au/fhir"
                        }
                      - nginx          = {
                          - platformImageUri = "ghcr.io/hl7au/au-fhir-inferno:8885d0c456d0fdfaa92a915410e54cd820adc0fc"
                        }
                      - postgresql     = {
                          - containerPorts = {
                              - postgresql = 5432
                            }
                          - enabled        = false
                          - externaldbhost = "(sensitive value)"
                          - global         = {
                              - postgresql = {
                                  - auth = {
                                      - database = "inferno"
                                      - password = "(sensitive value)"
                                      - username = "(sensitive value)"
                                    }
                                }
                            }
                        }
                    }
                )
              - version        = "0.2.0"
                # (1 unchanged attribute hidden)
            },
        ] -> (known after apply)
        name                       = "dev-inferno"
      ~ status                     = "pending-upgrade" -> "deployed"
        # (25 unchanged attributes hidden)

      + set {
          + name  = "nginx.platformImageUri"
          + value = "ghcr.io/hl7au/au-fhir-inferno:8885d0c456d0fdfaa92a915410e54cd820adc0fc"
            # (1 unchanged attribute hidden)
        }

      - set_sensitive {
          # At least one attribute in this block is (or was) sensitive,
          # so its contents will not be displayed.
        }
      - set_sensitive {
          # At least one attribute in this block is (or was) sensitive,
          # so its contents will not be displayed.
        }
      - set_sensitive {
          # At least one attribute in this block is (or was) sensitive,
          # so its contents will not be displayed.
        }
      + set_sensitive {
          # At least one attribute in this block is (or was) sensitive,
          # so its contents will not be displayed.
        }
      + set_sensitive {
          # At least one attribute in this block is (or was) sensitive,
          # so its contents will not be displayed.
        }
      + set_sensitive {
          # At least one attribute in this block is (or was) sensitive,
          # so its contents will not be displayed.
        }

        # (2 unchanged blocks hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

Copy link

github-actions bot commented Dec 4, 2024

Terraform Plan Output

Click to expand
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # helm_release.inferno will be created
  + resource "helm_release" "inferno" {
      + atomic                     = false
      + chart                      = "../helm/inferno"
      + cleanup_on_fail            = false
      + create_namespace           = true
      + dependency_update          = false
      + disable_crd_hooks          = false
      + disable_openapi_validation = false
      + disable_webhooks           = false
      + force_update               = false
      + id                         = (known after apply)
      + lint                       = false
      + manifest                   = (known after apply)
      + max_history                = 0
      + metadata                   = (known after apply)
      + name                       = "dev-inferno"
      + namespace                  = "dev-inferno"
      + pass_credentials           = false
      + recreate_pods              = false
      + render_subchart_notes      = true
      + replace                    = false
      + reset_values               = true
      + reuse_values               = false
      + skip_crds                  = false
      + status                     = "deployed"
      + timeout                    = 300
      + values                     = [
          + <<-EOT
                externalDomain: "dev.inferno.hl7.org.au"
                
                inferno:
                  imageUrl: "ghcr.io/hl7au/au-fhir-inferno:68270162fcc1997a9ffac63c78530921bf0f32cf"
                  terminologyServer: "https://tx.dev.hl7.org.au/fhir"
                  externalValidatorUrl: null  # This can be overridden during chart deployment
                
                controller:
                  enabled: false # Set to true to enable the ingress controller if you have not already installed it, multiple ingress controllers can be installed via https://kubernetes.github.io/ingress-nginx/user-guide/multiple-ingress/
                  ingressClass: "nginx"
                  ingressClassResource:
                    name: nginx
                    enabled: true
                    default: false
                  service:
                    annotations:
                      service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
                
                postgresql:
                  enabled: false # enable if not using rds from aws-impl
                  externaldbhost: null # This can be overridden during chart deployment
                  containerPorts:
                    postgresql: 5432
                  global:
                    postgresql:
                      auth:
                        username: "postgres"
                        password: "password"
                        database: "inferno"
            EOT,
        ]
      + verify                     = false
      + version                    = "0.2.0"
      + wait                       = true
      + wait_for_jobs              = false

      + set {
          + name  = "externalDomain"
          + value = "dev.inferno.hl7.org.au"
            # (1 unchanged attribute hidden)
        }
      + set {
          + name  = "inferno.imageUrl"
          + value = "ghcr.io/hl7au/au-fhir-inferno:68270162fcc1997a9ffac63c78530921bf0f32cf"
            # (1 unchanged attribute hidden)
        }
      + set {
          + name  = "nginx.platformImageUri"
          + value = "ghcr.io/hl7au/au-fhir-inferno:7a99baaf50e18e201e95f7ca91477bc41da0cda8-nginx"
            # (1 unchanged attribute hidden)
        }

      + set_sensitive {
          # At least one attribute in this block is (or was) sensitive,
          # so its contents will not be displayed.
        }
      + set_sensitive {
          # At least one attribute in this block is (or was) sensitive,
          # so its contents will not be displayed.
        }
      + set_sensitive {
          # At least one attribute in this block is (or was) sensitive,
          # so its contents will not be displayed.
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Copy link

github-actions bot commented Dec 4, 2024

Terraform Plan Output

Click to expand
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # helm_release.inferno is tainted, so must be replaced
-/+ resource "helm_release" "inferno" {
      ~ id                         = "dev-inferno" -> (known after apply)
      + manifest                   = (known after apply)
      ~ metadata                   = [
          - {
              - app_version    = "1.16.0"
              - chart          = "inferno-helmd"
              - first_deployed = 1733302235
              - last_deployed  = 1733302235
              - name           = "dev-inferno"
              - namespace      = "dev-inferno"
              - revision       = 1
              - values         = jsonencode(
                    {
                      - controller     = {
                          - enabled              = false
                          - ingressClass         = "nginx"
                          - ingressClassResource = {
                              - default = false
                              - enabled = true
                              - name    = "nginx"
                            }
                          - service              = {
                              - annotations = {
                                  - "service.beta.kubernetes.io/aws-load-balancer-type" = "nlb"
                                }
                            }
                        }
                      - externalDomain = "dev.inferno.hl7.org.au"
                      - inferno        = {
                          - externalValidatorUrl = null
                          - imageUrl             = "ghcr.io/hl7au/au-fhir-inferno:68270162fcc1997a9ffac63c78530921bf0f32cf"
                          - terminologyServer    = "https://tx.dev.hl7.org.au/fhir"
                        }
                      - nginx          = {
                          - platformImageUri = "ghcr.io/hl7au/au-fhir-inferno:7a99baaf50e18e201e95f7ca91477bc41da0cda8-nginx"
                        }
                      - postgresql     = {
                          - containerPorts = {
                              - postgresql = 5432
                            }
                          - enabled        = false
                          - externaldbhost = "(sensitive value)"
                          - global         = {
                              - postgresql = {
                                  - auth = {
                                      - database = "inferno"
                                      - password = "(sensitive value)"
                                      - username = "(sensitive value)"
                                    }
                                }
                            }
                        }
                    }
                )
              - version        = "0.2.0"
                # (1 unchanged attribute hidden)
            },
        ] -> (known after apply)
        name                       = "dev-inferno"
      ~ status                     = "failed" -> "deployed"
        # (25 unchanged attributes hidden)

      - set {
          - name  = "inferno.imageUrl" -> null
          - value = "ghcr.io/hl7au/au-fhir-inferno:68270162fcc1997a9ffac63c78530921bf0f32cf" -> null
            # (1 unchanged attribute hidden)
        }
      + set {
          + name  = "inferno.imageUrl"
          + value = "ghcr.io/hl7au/au-fhir-inferno:10a03203c0e7219c95146190c69114db178d942c"
            # (1 unchanged attribute hidden)
        }

        # (5 unchanged blocks hidden)
    }

Plan: 1 to add, 0 to change, 1 to destroy.

Copy link

github-actions bot commented Dec 4, 2024

Terraform Plan Output

Click to expand
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # helm_release.inferno will be created
  + resource "helm_release" "inferno" {
      + atomic                     = false
      + chart                      = "../helm/inferno"
      + cleanup_on_fail            = false
      + create_namespace           = true
      + dependency_update          = false
      + disable_crd_hooks          = false
      + disable_openapi_validation = false
      + disable_webhooks           = false
      + force_update               = false
      + id                         = (known after apply)
      + lint                       = false
      + manifest                   = (known after apply)
      + max_history                = 0
      + metadata                   = (known after apply)
      + name                       = "dev-inferno"
      + namespace                  = "dev-inferno"
      + pass_credentials           = false
      + recreate_pods              = false
      + render_subchart_notes      = true
      + replace                    = false
      + reset_values               = true
      + reuse_values               = false
      + skip_crds                  = false
      + status                     = "deployed"
      + timeout                    = 300
      + values                     = [
          + <<-EOT
                externalDomain: "default.inferno.hl7.org.au"
                
                inferno:
                  imageUrl: "ghcr.io/hl7au/au-fhir-inferno:68270162fcc1997a9ffac63c78530921bf0f32cf"
                  terminologyServer: "https://tx.dev.hl7.org.au/fhir"
                  externalValidatorUrl: null  # This can be overridden during chart deployment
                
                controller:
                  enabled: false # Set to true to enable the ingress controller if you have not already installed it, multiple ingress controllers can be installed via https://kubernetes.github.io/ingress-nginx/user-guide/multiple-ingress/
                  ingressClass: "nginx"
                  ingressClassResource:
                    name: nginx
                    enabled: true
                    default: false
                  service:
                    annotations:
                      service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
                
                postgresql:
                  enabled: false # enable if not using rds from aws-impl
                  externaldbhost: null # This can be overridden during chart deployment
                  containerPorts:
                    postgresql: 5432
                  global:
                    postgresql:
                      auth:
                        username: "postgres"
                        password: "password"
                        database: "inferno"
            EOT,
        ]
      + verify                     = false
      + version                    = "0.2.0"
      + wait                       = true
      + wait_for_jobs              = false

      + set {
          + name  = "externalDomain"
          + value = "dev.inferno.hl7.org.au"
            # (1 unchanged attribute hidden)
        }
      + set {
          + name  = "inferno.imageUrl"
          + value = "ghcr.io/hl7au/au-fhir-inferno:10a03203c0e7219c95146190c69114db178d942c"
            # (1 unchanged attribute hidden)
        }
      + set {
          + name  = "nginx.platformImageUri"
          + value = "ghcr.io/hl7au/au-fhir-inferno:7a99baaf50e18e201e95f7ca91477bc41da0cda8-nginx"
            # (1 unchanged attribute hidden)
        }

      + set_sensitive {
          # At least one attribute in this block is (or was) sensitive,
          # so its contents will not be displayed.
        }
      + set_sensitive {
          # At least one attribute in this block is (or was) sensitive,
          # so its contents will not be displayed.
        }
      + set_sensitive {
          # At least one attribute in this block is (or was) sensitive,
          # so its contents will not be displayed.
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Copy link

github-actions bot commented Dec 4, 2024

Terraform Plan Output

Click to expand
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # helm_release.inferno is tainted, so must be replaced
-/+ resource "helm_release" "inferno" {
      ~ id                         = "dev-inferno" -> (known after apply)
      + manifest                   = (known after apply)
      ~ metadata                   = [
          - {
              - app_version    = "1.16.0"
              - chart          = "inferno-helmd"
              - first_deployed = 1733305193
              - last_deployed  = 1733305193
              - name           = "dev-inferno"
              - namespace      = "dev-inferno"
              - revision       = 1
              - values         = jsonencode(
                    {
                      - controller     = {
                          - enabled              = false
                          - ingressClass         = "nginx"
                          - ingressClassResource = {
                              - default = false
                              - enabled = true
                              - name    = "nginx"
                            }
                          - service              = {
                              - annotations = {
                                  - "service.beta.kubernetes.io/aws-load-balancer-type" = "nlb"
                                }
                            }
                        }
                      - externalDomain = "dev.inferno.hl7.org.au"
                      - inferno        = {
                          - externalValidatorUrl = null
                          - imageUrl             = "ghcr.io/hl7au/au-fhir-inferno:10a03203c0e7219c95146190c69114db178d942c"
                          - terminologyServer    = "https://tx.dev.hl7.org.au/fhir"
                        }
                      - nginx          = {
                          - platformImageUri = "ghcr.io/hl7au/au-fhir-inferno:7a99baaf50e18e201e95f7ca91477bc41da0cda8-nginx"
                        }
                      - postgresql     = {
                          - containerPorts = {
                              - postgresql = 5432
                            }
                          - enabled        = false
                          - externaldbhost = "(sensitive value)"
                          - global         = {
                              - postgresql = {
                                  - auth = {
                                      - database = "inferno"
                                      - password = "(sensitive value)"
                                      - username = "(sensitive value)"
                                    }
                                }
                            }
                        }
                    }
                )
              - version        = "0.2.0"
                # (1 unchanged attribute hidden)
            },
        ] -> (known after apply)
        name                       = "dev-inferno"
      ~ status                     = "failed" -> "deployed"
        # (25 unchanged attributes hidden)

      - set {
          - name  = "inferno.imageUrl" -> null
          - value = "ghcr.io/hl7au/au-fhir-inferno:10a03203c0e7219c95146190c69114db178d942c" -> null
            # (1 unchanged attribute hidden)
        }
      + set {
          + name  = "inferno.imageUrl"
          + value = "ghcr.io/hl7au/au-fhir-inferno:d487ba0292c9d5224413424c76ab8a7a3172945e"
            # (1 unchanged attribute hidden)
        }

        # (5 unchanged blocks hidden)
    }

Plan: 1 to add, 0 to change, 1 to destroy.

@KyleOps KyleOps changed the title build nginx image Build and deploy nginx image sidecar Dec 4, 2024
@KyleOps KyleOps requested a review from projkov December 4, 2024 09:48
@KyleOps
Copy link
Collaborator Author

KyleOps commented Dec 4, 2024

Despite having the same parameters the dev env inferno has issues with puma

	from /usr/local/bundle/gems/inferno_core-0.4.44/lib/inferno.rb:12:in `require_relative'
	from /usr/local/bundle/gems/inferno_core-0.4.44/lib/inferno.rb:12:in `<top (required)>'
	from config.ru:1:in `require'
	from config.ru:1:in `block in <main>'
	from /usr/local/bundle/gems/rack-2.2.9/lib/rack/builder.rb:116:in `eval'
	from /usr/local/bundle/gems/rack-2.2.9/lib/rack/builder.rb:116:in `new_from_string'
	from /usr/local/bundle/gems/rack-2.2.9/lib/rack/builder.rb:105:in `load_file'
	from /usr/local/bundle/gems/rack-2.2.9/lib/rack/builder.rb:66:in `parse_file'
	from /usr/local/bundle/gems/puma-5.6.9/lib/puma/configuration.rb:348:in `load_rackup'
	from /usr/local/bundle/gems/puma-5.6.9/lib/puma/configuration.rb:270:in `app'
	from /usr/local/bundle/gems/puma-5.6.9/lib/puma/runner.rb:150:in `load_and_bind'
	from /usr/local/bundle/gems/puma-5.6.9/lib/puma/single.rb:44:in `run'
	from /usr/local/bundle/gems/puma-5.6.9/lib/puma/launcher.rb:193:in `run'
	from /usr/local/bundle/gems/puma-5.6.9/lib/puma/cli.rb:81:in `run'
	from /usr/local/bundle/gems/puma-5.6.9/bin/puma:10:in `<top (required)>'
	from /usr/local/bundle/bin/puma:25:in `load'
	from /usr/local/bundle/bin/puma:25:in `<top (required)>'
	from /usr/local/lib/ruby/3.1.0/bundler/cli/exec.rb:58:in `load'
	from /usr/local/lib/ruby/3.1.0/bundler/cli/exec.rb:58:in `kernel_load'
	from /usr/local/lib/ruby/3.1.0/bundler/cli/exec.rb:23:in `run'
	from /usr/local/lib/ruby/3.1.0/bundler/cli.rb:484:in `exec'
	from /usr/local/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /usr/local/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	from /usr/local/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	from /usr/local/lib/ruby/3.1.0/bundler/cli.rb:31:in `dispatch'
	from /usr/local/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	from /usr/local/lib/ruby/3.1.0/bundler/cli.rb:25:in `start'
	from /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.3.7/libexec/bundle:48:in `block in <top (required)>'
	from /usr/local/lib/ruby/3.1.0/bundler/friendly_errors.rb:103:in `with_friendly_errors'
	from /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.3.7/libexec/bundle:36:in `<top (required)>'
	from /usr/local/bundle/bin/bundle:25:in `load'
	from /usr/local/bundle/bin/bundle:25:in `<main>'

The new nginx wrapper with static content seems to be working correctly on https://inferno.hl7.org.au/ so might be url related, will need to check in at the standup.

Copy link

github-actions bot commented Dec 4, 2024

Terraform Plan Output

Click to expand
No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration
and found no differences, so no changes are needed.

@projkov projkov requested a review from ir4y December 4, 2024 16:08
Copy link

github-actions bot commented Dec 5, 2024

Terraform Plan Output

Click to expand
No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration
and found no differences, so no changes are needed.

@projkov projkov merged commit 46becc5 into master Dec 5, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants