Skip to content

Commit d02b08b

Browse files
committed
/shrug
1 parent 0fb71f2 commit d02b08b

File tree

9 files changed

+1118
-0
lines changed

9 files changed

+1118
-0
lines changed

Diff for: .github/workflows/push.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Pulumi
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
up:
8+
name: Update
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
fetch-depth: 1
14+
- uses: docker://pulumi/actions
15+
with:
16+
args: up --yes
17+
env:
18+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
19+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
20+
PULUMI_CI: up

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/node_modules
12
abatilo*.pdf
23
*.aux
34
*.log

Diff for: .tool-versions

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pulumi 2.2.1

Diff for: Pulumi.resume.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
encryptionsalt: v1:AfYu4b/jitc=:v1:NCMERCZ2O+S728FZ:3qdV0zcgL25mNB/Zq0sFSpvLOEKEDA==
2+
config:
3+
aws:region: us-west-2

Diff for: Pulumi.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: resume
2+
runtime: nodejs
3+
description: My resume
4+
backend:
5+
url: s3://abatilo/infra/cloud/

Diff for: index.ts

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import * as awsx from "@pulumi/awsx";
2+
import * as k8s from "@pulumi/kubernetes";
3+
import * as pulumi from "@pulumi/pulumi";
4+
5+
const clusterStackRef = new pulumi.StackReference("prod");
6+
const kubeconfig = clusterStackRef.getOutput("kubeconfig");
7+
const k8sProvider = new k8s.Provider("prod", {
8+
kubeconfig,
9+
});
10+
11+
const appName = "resume";
12+
const repository = new awsx.ecr.Repository(appName);
13+
const image = repository.buildAndPushImage("./");
14+
15+
const appLabels = { app: appName };
16+
17+
const deployment = new k8s.apps.v1.Deployment(
18+
appName,
19+
{
20+
metadata: { labels: appLabels },
21+
spec: {
22+
replicas: 2,
23+
selector: { matchLabels: appLabels },
24+
template: {
25+
metadata: { labels: appLabels },
26+
spec: {
27+
containers: [
28+
{
29+
name: appName,
30+
image,
31+
ports: [{ name: "http", containerPort: 80 }],
32+
},
33+
],
34+
},
35+
},
36+
},
37+
},
38+
{ provider: k8sProvider }
39+
);

0 commit comments

Comments
 (0)