Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
First release
Browse files Browse the repository at this point in the history
  • Loading branch information
lfeldman committed Feb 16, 2021
1 parent 7324b90 commit edf23e1
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 3 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ If you don't have the required permissions and quota, contact your tenancy admin

## Deploy Using Oracle Resource Manager

1. Click [![Deploy to Oracle Cloud](https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?region=home&zipUrl=https://github.com/oracle-quickstart/oci-arch-cassandra/raw/master/resource-manager/oci-arch-cassandra.zip)

1. Click [![Deploy to Oracle Cloud](https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?region=home&zipUrl=https://github.com/oracle-quickstart/oci-arch-cassandra/releases/latest/download/oci-arch-cassandra-stack-latest.zip)

If you aren't already signed in, when prompted, enter the tenancy and user credentials.

Expand Down
1 change: 1 addition & 0 deletions cassandra.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ module "cassandra" {
ssh_authorized_keys = tls_private_key.public_private_key_pair.public_key_openssh
ssh_private_key = tls_private_key.public_private_key_pair.private_key_pem
cassandra_version = var.cassandra_version
defined_tags = {"${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release }
}
6 changes: 5 additions & 1 deletion network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ resource "oci_core_virtual_network" "CassandraVCN" {
compartment_id = var.compartment_ocid
display_name = "CassandraVCN"
dns_label = "ocicassandra"
defined_tags = {"${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release }
}

############################################
Expand All @@ -15,6 +16,7 @@ resource "oci_core_internet_gateway" "CassandraIG" {
compartment_id = var.compartment_ocid
display_name = "${var.label_prefix}CassandraIG"
vcn_id = oci_core_virtual_network.CassandraVCN.id
defined_tags = {"${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release }
}

############################################
Expand All @@ -31,6 +33,7 @@ resource "oci_core_route_table" "CassandraRT" {
# Internet Gateway route target for instances on public subnets
network_entity_id = oci_core_internet_gateway.CassandraIG.id
}
defined_tags = {"${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release }
}

############################################
Expand Down Expand Up @@ -72,7 +75,7 @@ resource "oci_core_security_list" "CassandraSL" {
protocol = "6"
source = "0.0.0.0/0"
}

defined_tags = {"${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release }
}

############################################
Expand All @@ -92,4 +95,5 @@ resource "oci_core_subnet" "CassandraSubnet" {
vcn_id = oci_core_virtual_network.CassandraVCN.id
route_table_id = oci_core_route_table.CassandraRT.id
dhcp_options_id = oci_core_virtual_network.CassandraVCN.default_dhcp_options_id
defined_tags = {"${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release }
}
7 changes: 7 additions & 0 deletions schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ variableGroups:
- label_prefix
- storage_port
- ssl_storage_port
- release

variables:

Expand Down Expand Up @@ -149,6 +150,12 @@ variables:
title: "SSL Storage Port in Cassandra cluster"
description: "Choose SSL Storage Port in Cassandra cluster."

release:
type: string
required: false
visible: false
title: "Reference Architecture Release (OCI Architecture Center)"

outputs:

generated_ssh_private_key:
Expand Down
25 changes: 25 additions & 0 deletions tags.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
resource "oci_identity_tag_namespace" "ArchitectureCenterTagNamespace" {
compartment_id = var.compartment_ocid
description = "ArchitectureCenterTagNamespace"
name = "ArchitectureCenter\\ha-cassandra-cluster"

provisioner "local-exec" {
command = "sleep 10"
}
}

resource "oci_identity_tag" "ArchitectureCenterTag" {
description = "ArchitectureCenterTag"
name = "release"
tag_namespace_id = oci_identity_tag_namespace.ArchitectureCenterTagNamespace.id

validator {
validator_type = "ENUM"
values = ["release", "1.0"]
}

provisioner "local-exec" {
command = "sleep 20"
}

}
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ variable "private_key_path" {}
variable "region" {}
variable "compartment_ocid" {}

variable "release" {
description = "Reference Architecture Release (OCI Architecture Center)"
default = "1.0"
}

variable "instance_os" {
description = "Operating system for compute instances"
default = "Oracle Linux"
Expand Down

0 comments on commit edf23e1

Please sign in to comment.