Skip to content

Instantly share code, notes, and snippets.

View torresdal's full-sized avatar

Jon Arild Tørresdal torresdal

View GitHub Profile
@torresdal
torresdal / doc_v1.0_GettingStarted_ConfigureIIS.cs
Last active January 2, 2016 20:49
Code snippets for ConDep Doc version 1.0 - Getting Started
public class WebServerInfrastructure : InfrastructureArtifact
{
public override void Configure(IOfferInfrastructure require, ConDepConfig config)
{
require
.IIS()
.IISAppPool("MyAppPool")
.IISWebSite("MyWebSite", 5, opt => opt
.ApplicationPool("MyAppPool")
.WebApp("MyWebApp", webAppOpt => webAppOpt
@torresdal
torresdal / doc_v1.0_LocalOps_TransformConf.cs
Created January 10, 2014 19:22
Code snippets for ConDep Doc version 1.0 - Local Operations
public override void Configure(IOfferLocalOperations onLocalMachine, ConDepConfig config)
{
onLocalMachine
.TransformConfigFile(@"C:\MyApp", "web.config", "web.test.config");
}
@torresdal
torresdal / iac_cd_alternatives.md
Last active July 5, 2016 09:10
Alternatives to Ifrastructure as Code and Continuous Delivery

Here's the alternatives I suggest for supporting Infrastructure as Code and Continuous Delivery.

Docker Cloud

Using Docker Cloud has a cost of $7 for 5 repositories + $0.02 per hour per node.

Example:

3 nodes à $14.4 $43.2 6 nodes à $14.4 $86.4 12 nodes à $14.4 $172.8
# env
KUBERNETES_PORT=443
KUBERNETES_SERVICE_PORT=443
HOSTNAME=my-pod-77cb7d647–9zftg
MY_SECRET=my-secret-from-azure@azurekeyvault
...
spec:
containers:
env:
- name: MY_SECRET
value: my-secret-from-azure@azurekeyvault
...
apiVersion: spv.no/v1alpha1
kind: AzureKeyVaultSecret
metadata:
name: my-first-azure-keyvault-certificate
namespace: default
spec:
vault:
name: my-kv
object:
type: certificate
apiVersion: v1
data:
tls.crt: ...
tls.key: ...
kind: Secret
metadata:
name: keyvault-certificate
namespace: default
type: kubernetes.io/tls
apiVersion: spv.no/v1alpha1
kind: AzureKeyVaultSecret
metadata:
name: my-first-azure-keyvault-certificate
namespace: default
spec:
vault:
name: my-kv
object:
type: certificate
...
containers:
- name: alpine
env:
- name: MY_PUBLIC_KEY
value: my-first-azure-keyvault-certificate@azurekeyvault?tls.crt
- name: MY_PRIVATE_KEY
value: my-first-azure-keyvault-certificate@azurekeyvault?tls.key
...
apiVersion: apps/v1
kind: Deployment
metadata:
name: customer
namespace: customer
labels:
app: customer
annotations:
flux.weave.works/automated: 'true'
spec: