Skip to content

Instantly share code, notes, and snippets.

@jaxxstorm
Created April 18, 2022 19:56
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jaxxstorm/8880143ed115e95b751694397b1cdbbe to your computer and use it in GitHub Desktop.
temporal with EKS
import * as path from "path";
import * as aws from "@pulumi/aws";
import * as awsx from "@pulumi/awsx";
import * as eks from "@pulumi/eks";
import * as k8s from "@pulumi/kubernetes"
const defaultTags = {
Owner: "lbriggs"
}
// Standup the VPC
const vpc = new awsx.ec2.Vpc("vpc", {
cidrBlock: "10.1.0.0/24",
numberOfAvailabilityZones: 3,
numberOfNatGateways: 0,
assignGeneratedIpv6CidrBlock: false,
subnets: [{ type: "public", name: "public", }, { type: "private", name: "private" }],
});
// Standup the EKS deployment
const cluster = new eks.Cluster("temporal-eks", {
// clusterSecurityGroup: {}
// nodeSecurityGroup: {}
providerCredentialOpts: {
profileName: "pulumi-dev-sandbox"
},
vpcId: vpc.id,
subnetIds: vpc.getSubnetsIds("private"),
enabledClusterLogTypes: ["audit"],
encryptRootBlockDevice: true,
instanceType: "t2.medium",
kubernetesServiceIpAddressRange: "172.16.0.0/16",
tags: Object.assign(defaultTags, { Name: "eks" }),
});
const nodeGroup = new aws.eks.NodeGroup("spot", {
clusterName: cluster.eksCluster.name,
nodeRoleArn: cluster.instanceRoles[0].arn,
capacityType: "SPOT",
scalingConfig: {
desiredSize: 5,
minSize: 1,
maxSize: 10,
},
subnetIds: vpc.publicSubnetIds,
})
export const kubeconfig = cluster.kubeconfig
const _temporal = new k8s.helm.v3.Release("temp", {
chart: "./temporal",
version: "1.0.0",
atomic: true,
skipAwait: true,
timeout: 6000,
values: {
server: {
replicaCount:1
},
cassandra: {
config: {
cluster_size: 1,
}
},
prometheus: {
enabled: true
},
grafana: { enabled: true},
elasticearch: { enabled: false},
}
}, { provider: cluster.provider, dependsOn: [ nodeGroup ] });
// ===
// Outputs
// ===
export const vpcId = vpc.id;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment