-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to Cumulus 18.1.0, ORCA 8.1.0 (#283)
- Loading branch information
1 parent
f408074
commit 2744854
Showing
13 changed files
with
177 additions
and
96 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 |
---|---|---|
@@ -1 +1 @@ | ||
0.13.6 | ||
1.5.7 |
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 |
---|---|---|
|
@@ -75,20 +75,6 @@ RUN : \ | |
&& npm install -g [email protected] \ | ||
&& : | ||
|
||
# Install Cumulus CLI (see https://github.com/NASA-IMPACT/cumulus-cli) | ||
WORKDIR /usr/src | ||
RUN git clone --depth 1 https://github.com/NASA-IMPACT/cumulus-cli.git | ||
WORKDIR /usr/src/cumulus-cli | ||
# hadolint ignore=SC1091 | ||
RUN : \ | ||
&& source "${NVM_DIR}/nvm.sh" --install \ | ||
&& nvm install \ | ||
&& npm install \ | ||
&& npm run build \ | ||
&& npm install -g \ | ||
&& ln -s "$(which cumulus)" /usr/local/bin/cumulus \ | ||
&& : | ||
|
||
WORKDIR /work | ||
|
||
# Install node dependencies | ||
|
@@ -107,6 +93,10 @@ RUN : \ | |
# changes in the wrong environment. | ||
# hadolint ignore=SC2016 | ||
RUN : \ | ||
# Add yarn bin to path so that the `cumulus` command can be found. It was | ||
# installed by `yarn install` because it is in the `devDependencies` list in | ||
# the package.json file. | ||
&& echo 'export PATH="$(yarn bin):${PATH}"' >> ~/.bashrc \ | ||
&& echo 'export PS1="(${AWS_PROFILE:-[ERROR: AWS_PROFILE is not defined]}:${TS_ENV:-[ERROR: TS_ENV is undefined]}):\w \$ "' >> ~/.bashrc \ | ||
#----------------------------------------------------------------------------- | ||
# IMPORTANT | ||
|
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,40 @@ | ||
class PatchCumulus18_1_0 | ||
def call(runner) | ||
mod = runner.mod | ||
|
||
# This is a hack to work around the fact that the Cumulus 18.1.0 S3 | ||
# Replicator module references an undeclared Terraform variable, due to a | ||
# typo. This simply patches the module to fix the typo before running | ||
# `terraform apply`. | ||
|
||
filepath = "#{mod.cache_dir}/.terraform/modules/s3-replicator/main.tf" | ||
|
||
File.write(filepath, File.open(filepath) do |f| | ||
f.read.gsub(/lambda_memory_size\b/, "lambda_memory_sizes") | ||
end) | ||
|
||
# Replace all references to deprecated `aws_s3_bucket_object` with `aws_s3_object` | ||
# This isn't strictly necessary, but it eliminates noisy warnings from Terraform. | ||
# This can be removed once Cumulus directly addresses the deprecations. | ||
|
||
filepaths = [ | ||
"cumulus/tf-modules/archive/api.tf", | ||
"cumulus/tf-modules/cumulus/ecs_cluster.tf", | ||
"cumulus/tf-modules/cumulus/main.tf", | ||
"cumulus/tf-modules/ingest/message_template.tf", | ||
"discover_granules_workflow/tf-modules/workflow/main.tf", | ||
"ingest_and_publish_granule_workflow/tf-modules/workflow/main.tf", | ||
] | ||
|
||
filepaths.each do |filepath| | ||
full_filepath = "#{mod.cache_dir}/.terraform/modules/#{filepath}" | ||
File.write(full_filepath, File.open(full_filepath) do |f| | ||
f.read.gsub(/aws_s3_bucket_object/, "aws_s3_object") | ||
end) | ||
end | ||
end | ||
end | ||
|
||
before("plan", "apply", | ||
execute: PatchCumulus18_1_0, | ||
) |
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
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,5 +1,11 @@ | ||
# See https://terraspace.cloud/docs/config/args/terraform/ | ||
|
||
command("init", | ||
args: ["-reconfigure"], | ||
args: ["-no-color", "-reconfigure", "-upgrade"], | ||
) | ||
command("plan", | ||
args: ["-no-color", "-refresh=false"], | ||
) | ||
command("apply", | ||
args: ["-no-color"], | ||
) |
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,5 +1,5 @@ | ||
module Terraspace::Project::CumulusVersionHelper | ||
def cumulus_version | ||
"v16.1.1" | ||
"v18.1.0" | ||
end | ||
end |
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
Oops, something went wrong.