Property | Value/Behaviour TF | Value/Behaviour CDK | Opinion |
---|---|---|---|
Basic task | Define and end state for the system and apply it when appropriate | Generate AWS Cloudformation template to work with stack resources | CDK benefits from AWS internal service. TF depends on AWS API |
Language | Terraform Config language | Support for Typescrypt, Java, .Net, Go, Python | CDK advantage for training with known languages |
Backend | TF state file (json) | AWS Cloudformation | TF requires a backend to be setup and hosted (can use S3 and DynamoDB), CDK may require CDK bootstrapping (deploys S3 and IAM through a stack via the tool) |
Setup | Docker containers available from Hashicorp | Requires Node.js to run CDK, then the language platform of choice | In both changes different envs with different versions may cause breaking changes if not car |
#!/bin/sh | |
set -eu | |
PROTO='udp' | |
PORT='123' | |
LOG='NTP' | |
CHAIN=ntplog | |
SET=ntplog | |
MAXELEM=33554432 | |
HASHSIZE=65535 |
Hello there, I tried the challenges and found it a good way to jump onto serverless and ML services.
So here's a summary blog as some pros and cons tables anyone may find on the challenges.
#!/bin/bash | |
set -e | |
if [ $# -eq 0 ]; then | |
echo "USAGE: $0 plugin1 plugin2 ..." | |
exit 1 | |
fi | |
plugin_dir=/var/lib/jenkins/plugins |
Jenkins has a very rich catalog of plugins and it's quite easy to install and update them via UI. BTW, when you want to add tons of plugin via UI, it's a fairly long and boring procedure.
Hopefully, mass installation (or update) could be easy using a simple bash script (curl/python required) :
Create a file containing plugins to be installed (or updated), ie iplugins :
I'm going to walk you through the steps for setting up a AWS Lambda to talk to the internet and a VPC. Let's dive in.
So it might be really unintuitive at first but lambda functions have three states.
- No VPC, where it can talk openly to the web, but can't talk to any of your AWS services.
- VPC, the default setting where the lambda function can talk to your AWS services but can't talk to the web.
- VPC with NAT, The best of both worlds, AWS services and web.
// | |
// Generate EXIF GPS metadata | |
// Swift 3 | |
// Exif Version 2.2.0.0 supports decimal degrees | |
import Foundation | |
import CoreLocation | |
import ImageIO | |
extension CLLocation { |
#!/usr/bin/env bash | |
# Runs all .json files through pythons json lint tool before commiting, | |
# to make sure that you don't commit broken json objects. | |
git_dir=$(git rev-parse --show-toplevel) | |
for file in $(git diff-index --name-only --diff-filter=ACM --cached HEAD -- \ | |
| grep -P '\.(json)$'); do | |
python -mjson.tool $file 2> /dev/null | |
if [ $? -ne 0 ] ; then |