This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:3.14 | |
ENV AWSCLI_VERSION "1.20.7" | |
RUN apk add --update \ | |
python3 \ | |
python3-dev \ | |
py-pip \ | |
build-base \ | |
&& pip install awscli==$AWSCLI_VERSION --upgrade --user \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python | |
# Dispatch - synchronize two folders | |
import os | |
import filecmp | |
import shutil | |
from stat import * | |
class Dispatch: | |
''' This class represents a synchronization object ''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node { | |
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1' | |
echo 'No quotes, pipeline command in single quotes' | |
sh 'echo $BUILD_NUMBER' // 1 | |
echo 'Double quotes are silently dropped' | |
sh 'echo "$BUILD_NUMBER"' // 1 | |
echo 'Even escaped with a single backslash they are dropped' | |
sh 'echo \"$BUILD_NUMBER\"' // 1 | |
echo 'Using two backslashes, the quotes are preserved' | |
sh 'echo \\"$BUILD_NUMBER\\"' // "1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This is an extension of the technique first detailed here: | |
http://sedimental.org/remap.html#add_common_keys | |
In short, it calls remap on each container, back to front, using the accumulating | |
previous values as the default for the current iteration. | |
""" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
############### | |
# SysV Init Information | |
# description: docker daemon. | |
### BEGIN INIT INFO | |
# Provides: me | |
# Required-Start: | |
# Required-Stop: | |
# Default-Start: 2 3 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############################################### | |
# To use: | |
# chmod +x install-redis.sh | |
# ./install-redis.sh | |
############################################### | |
version=3.2.0 | |
echo "*****************************************" | |
echo " 1. Prerequisites: Install updates, set time zones, install GCC and make" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/etc/init.d/cloud-management stop | |
mysql -ppassword -e 'drop database cloud' | |
mysql -ppassword -e 'drop database cloud_usage' | |
cloud-setup-databases cloud:password@localhost --deploy-as=root:password | |
rm -rf /var/log/cloud/management/* | |
cloud-setup-management | |
/etc/init.d/cloud-management start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: logstash | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start daemon at boot time | |
# Description: Enable service provided by daemon. |