-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
55d38ef
commit 03530ad
Showing
13 changed files
with
307 additions
and
37 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
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,10 @@ | ||
FROM ghcr.io/oracle/oraclelinux8-instantclient:21 | ||
|
||
RUN curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/8/x86_64/newrelic-infra.repo && \ | ||
dnf install -y dnf-plugins-core && \ | ||
dnf config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo && \ | ||
yum install -y make terraform | ||
|
||
ADD entrypoint.sh /entrypoint.sh | ||
|
||
ENTRYPOINT ["sh", "/entrypoint.sh"] |
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,32 @@ | ||
#!/usr/bin/env sh | ||
set -e | ||
|
||
help() { | ||
echo "This entrypoint limit users input to make targets but provides the possibility" | ||
echo "to clone a repository before executing make. These are the accepted args:" | ||
echo "" | ||
echo "/entrypoint.sh [-v|--verbose] [-g|--github|--repository] [-r|--ref|--branch|--commit] [-h|--help] [--] <make target and variables>" | ||
echo "" | ||
echo " -v, --verbose Set shell's verbose mode" | ||
echo " -g, --repository Set the repository's url from where to clone it" | ||
echo " -r, --ref, --commit Set" | ||
echo " -h, --help Set" | ||
exit 1 | ||
} | ||
|
||
while true; do | ||
case "$1" in | ||
-v | --verbose ) set -x; shift ;; | ||
-g | --repository ) REPO="$2"; shift 2 ;; | ||
-r | --ref | --commit ) REF="$2"; shift 2 ;; | ||
-h | --help ) help ;; | ||
-- ) shift; break ;; | ||
* ) break ;; | ||
esac | ||
done | ||
|
||
echo "Cloning '${REF}' reference from the repo '${REPO}'" | ||
git clone "${REPO}" "${REF}" | ||
|
||
echo Calling make "$@" | ||
make "$@" |
2 changes: 2 additions & 0 deletions
2
...m_modules/aws_managed/.terraform.lock.hcl → .../aws_managed_instance/.terraform.lock.hcl
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
21 changes: 16 additions & 5 deletions
21
...modules/aws_managed/oracle-db-instance.tf → ...ws_managed_instance/oracle-db-instance.tf
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
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,33 @@ | ||
resource aws_ecs_task_definition oracledb_e2e_runner { | ||
family = "github-task--oracledb-e2e-tester" | ||
|
||
task_role_arn = data.terraform_remote_state.base_framework.outputs.github_runner.aws_iam_role.task_role.arn | ||
execution_role_arn = data.terraform_remote_state.base_framework.outputs.github_runner.aws_iam_role.execution_role.arn | ||
requires_compatibilities = ["FARGATE"] | ||
|
||
cpu = 2 * 1024 # Measured in shares: 1024 shares == 1 vCPU | ||
memory = 4 * 1024 # Measured in megabytes | ||
network_mode = "awsvpc" | ||
|
||
container_definitions = jsonencode([ | ||
{ | ||
name = "provisioner", | ||
#cpu = 2 * 1024, # Measured in shares: 1024 shares == 1 vCPU | ||
#memory = 4 * 1024, # Measured in megabytes | ||
|
||
essential = true, | ||
readonlyRootFilesystem = false, | ||
|
||
image = "jperezflorez123/nri-oracledb:devel-tooling-latest", | ||
|
||
logConfiguration = { | ||
"logDriver" = "awslogs" | ||
"options" = { | ||
"awslogs-group" : data.terraform_remote_state.base_framework.outputs.github_runner.aws_cloudwatch_log_group.github_task_runner.name, | ||
"awslogs-region" : var.aws_region, | ||
"awslogs-stream-prefix" : split("/", data.terraform_remote_state.base_framework.outputs.github_runner.aws_cloudwatch_log_group.github_task_runner.name)[1] | ||
} | ||
} | ||
} | ||
]) | ||
} |
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,42 @@ | ||
terraform { | ||
required_providers { | ||
aws = { | ||
source = "hashicorp/aws" | ||
version = ">= 3.0" | ||
} | ||
} | ||
|
||
backend s3 { | ||
bucket = "nr-coreint-terraform-tfstates" | ||
dynamodb_table = "nr-coreint-terraform-locking" | ||
key = "integrations/oracledb/fargate-task.tfstate" | ||
region = "us-east-1" | ||
profile = "base-framework" | ||
} | ||
} | ||
|
||
# ########################################### # | ||
# AWS # | ||
# ########################################### # | ||
provider aws { | ||
region = var.aws_region | ||
profile = var.aws_profile | ||
|
||
default_tags { | ||
tags = { | ||
"owning_team" = "COREINT" | ||
"purpose" = "development-integration-environments" | ||
"integration" = "nri-oracledb" | ||
} | ||
} | ||
} | ||
|
||
# Variables so we can change them using Environment variables. | ||
variable aws_region { | ||
type = string | ||
default = "us-east-1" | ||
} | ||
variable aws_profile { | ||
type = string | ||
default = "coreint" | ||
} |
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,11 @@ | ||
data terraform_remote_state base_framework { | ||
backend = "s3" | ||
|
||
config = { | ||
bucket = "nr-coreint-terraform-tfstates" | ||
dynamodb_table = "nr-coreint-terraform-locking" | ||
key = "base-framework/global-state-store.tfstate" | ||
region = "us-east-1" | ||
profile = "base-framework" | ||
} | ||
} |
Oops, something went wrong.