Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2 from apache/DLAB-terraform
Browse files Browse the repository at this point in the history
Dlab terraform
  • Loading branch information
AdamsDisturber committed Jul 16, 2019
2 parents 50c46d7 + b8f8034 commit 8c139ca
Show file tree
Hide file tree
Showing 55 changed files with 1,149 additions and 464 deletions.
Expand Up @@ -18,11 +18,4 @@
# under the License.
#
# ******************************************************************************
variable "nginx_http_port" {
default = "31080"
description = "Sets the nodePort that maps to the Ingress' port 80"
}
variable "nginx_https_port" {
default = "31443"
description = "Sets the nodePort that maps to the Ingress' port 443"
}

Expand Up @@ -26,12 +26,12 @@ locals {
}

data "template_file" "endpoint_policy" {
template = file("../modules/endpoint/files/endpoint-policy.json")
template = file("./files/endpoint-policy.json")
}

resource "aws_iam_role" "endpoint_role" {
name = local.role_name
assume_role_policy = file("../modules/endpoint/files/assume-policy.json")
assume_role_policy = file("./files/assume-policy.json")
tags = {
product = "${var.product}"
Name = "${local.role_name}"
Expand Down
Expand Up @@ -19,36 +19,8 @@
#
# ******************************************************************************

variable "service_base_name" {}

variable "vpc_id" {}

variable "vpc_cidr" {}

variable "subnet_id" {}

variable "subnet_cidr" {}

variable "env_os" {}

variable "ami" {}

variable "key_name" {}

variable "region" {}

variable "zone" {}

variable "ssn_k8s_masters_count" {}

variable "ssn_k8s_workers_count" {}

variable "ssn_root_volume_size" {}

variable "allowed_cidrs" {}

variable "ssn_k8s_masters_shape" {}

variable "ssn_k8s_workers_shape" {}

variable "os_user" {}
provider "aws" {
region = var.region
access_key = var.access_key_id
secret_key = var.secret_access_key
}
Expand Up @@ -21,6 +21,13 @@

variable "service_base_name" {}

variable "access_key_id" {
default = ""
}
variable "secret_access_key" {
default = ""
}

variable "region" {}

variable "zone" {}
Expand Down
143 changes: 0 additions & 143 deletions infrastructure-provisioning/terraform/aws/main/main.tf

This file was deleted.

75 changes: 0 additions & 75 deletions infrastructure-provisioning/terraform/aws/modules/ssn-k8s/vpc.tf

This file was deleted.

@@ -1,3 +1,4 @@
{{- /*
# *****************************************************************************
#
# Licensed to the Apache Software Foundation (ASF) under one
Expand All @@ -18,6 +19,8 @@
# under the License.
#
# ******************************************************************************
*/ -}}

apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -45,17 +48,20 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: https
containerPort: 443
# - name: https
# containerPort: 443
# protocol: TCP
- name: http
containerPort: 80
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
# livenessProbe:
# httpGet:
# path: /
# port: http
# readinessProbe:
# httpGet:
# path: /
# port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
Expand Down
@@ -1,4 +1,5 @@
# *****************************************************************************
{{- /*
# ******************************************************************************
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
Expand All @@ -18,17 +19,20 @@
# under the License.
#
# ******************************************************************************
{- if .Values.ingress.enabled -}}
*/ -}}

{{- if .Values.ingress.enabled -}}
{{- $fullName := include "dlab-ui.fullname" . -}}
{{ $servicePort := .Values.service.port }}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{ include "dlab-ui.labels" . | indent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- with .Values.ingress.annotations }}
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
Expand All @@ -49,7 +53,7 @@ spec:
- path: {{ . }}
backend:
serviceName: {{ $fullName }}
servicePort: 443
servicePort: {{ $servicePort }}
{{- end }}
{{- end }}
{{- end }}

0 comments on commit 8c139ca

Please sign in to comment.