- no upfront installation/agents on remote/slave machines - ssh should be enough
- application components should use third-party software, e.g. HDFS, Spark's cluster, deployed separately
- configuration templating
- environment requires/asserts, i.e. we need a JVM in a given version before doing deployment
- deployment process run from Jenkins
#!/usr/bin/env bash | |
set -e | |
# Formats any *.tf files according to the hashicorp convention | |
files=$(git diff --cached --name-only) | |
for f in $files | |
do | |
if [ -e "$f" ] && [[ $f == *.tf ]]; then | |
#terraform validate `dirname $f` | |
terraform fmt $f |
This sample includes a continuous deployment pipiline for websites built with React. We use AWS CodePipeline, CodeBuild, and SAM to deploy the application. To deploy the application to S3 using SAM we use a custom CloudFormation resource.
buildspec.yml
: YAML configuration for CodeBuild, this file should be in the root of your code repositoryconfigure.js
: Script executed in the build step to generate a config.json file for the application, this is used to include values exported by other CloudFormation stacks (separate services of the same application).index.js
: Custom CloudFormation resource that publishes the website to an S3 bucket. As you can see from the buildspec and SAM template, this function is located in as3-deployment-custom-resource
sub-folder of the repoapp-sam.yaml
: Serverless Application model YAML file. This configures the S3 bucket and the cu
<Project DefaultTargets="CopyOutputs;DeployService" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> | |
<!-- These settings control what the service's name, description etc appear in services.msc task panel. --> | |
<PropertyGroup Label="ServiceMetaData"> | |
<ServiceName>ShinyNewService</ServiceName> | |
<ServiceDisplayName>Shiny New Service</ServiceDisplayName> | |
<ServiceDescription>A shiny new service, that changes the world for the greater good.</ServiceDescription> | |
</PropertyGroup> | |
<Choose> |
java -version
Check the latest version a build numbers in http://www.oracle.com/technetwork/java/javase/downloads/index.html
For url http://download.oracle.com/otn-pub/java/jdk/8u91-b14/jdk-8u91-linux-x64.tar.gz, the variables should be defined as:
java_base_version="8"
java_sub_version="11"
--- | |
# tasks file for app_service_setup | |
# | |
- block: | |
- name: Deploy application service script | |
template: | |
src: service.j2 | |
dest: /etc/init.d/app-{{ app_name }} | |
owner: root | |
group: root |
--- | |
# tasks file for app_service_setup | |
# | |
- block: | |
- name: Deploy application service script | |
template: | |
src: service.j2 | |
dest: /etc/init.d/app-{{ app_name }} | |
owner: root | |
group: root |
This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.
While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.
kubectl apply -f https://gist.githubusercontent.com/initcron/db8f1bbb5a884a91032cf53cd496a395/raw/aad04d509a751b2ea0cfbf3dbaa6330a1b37699d/dash-svc.yml
kubectl describe svc kdash -n kube-system
Link to Application Source: https://github.com/schoolofdevops/sysfoo
Description:
Sysfoo is a java based web application, which uses maven as a build tool. The build specifications are provided with pom.xml in the root directory of the project. Your job is to write a dockerfile to build and package the sysfoo application.