Coder Social home page Coder Social logo

berlin-pug-26-07's Introduction

PUG Demo

This repository contains the demo code for the Pulumi User Group meetups.

Infrastructure Deployment

The infrastructure deployment will be done using Pulumi AWS and EKS provider. As language we will use Go.

cd infrastructure-go

pulumi preview [--policy-pack ../policy-as-code/infra]
pulumi up [--policy-pack ../policy-as-code/infra]

After the infrastructure is deployed, we need to get the kubeconfig from the stack output and save it to a file.

pulumi stack output kubeconfig --show-secrets > kubeconfig.yaml

This is not a necessary step as we're going to use Pulumi Stack References to get the kubeconfig from the infrastructure stack. See https://www.pulumi.com/learn/building-with-pulumi/stack-references/ for more details.

Application Deployment

This deployment will be done using Pulumi AI. Head over to https://pulumi.com/ai and enter following prompt:

Imagine you are a Kubernetes application developer and need to use a stack reference (dirien/pug-infrastructure-go/dev) to
get Kubeconfig from a different stack.
Then you create a Nginx (use the latest tag for the image) deployment with a custom config map, which contains "Hello
Pulumi World" as part of the nginx.conf location tag inside the server tag under http. This config map should then be mounted on /etc/nginx/. Finally, expose this deployment via a service
of type nodeport. Create an ingress also. The ingress class should be "alb". Add the missing annotations for the
application load Balancer "internet-facing" and "instance".

Create only one Kubernetes provider and pass it as dependency to the resources.

Finally Export the address of the ingress as output by interpolating the `http` protocol to it.

Here is a link to a working solution: https://www.pulumi.com/ai/?convid=89a5a223-34bd-4b16-acb2-513f3cb2257c

cd application-ts
pulumi preview [--policy-pack ../policy-as-code/app]

berlin-pug-26-07's People

Contributors

dirien avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.