This repository is a metapackage for Gaufrette XYZ adapter.
For issues and PRs please go on KnpLabs/Gaufrette.
Read the official Gaufrette documentation and the documentation for this adapter here.
This repository is a metapackage for Gaufrette XYZ adapter.
For issues and PRs please go on KnpLabs/Gaufrette.
Read the official Gaufrette documentation and the documentation for this adapter here.
export default class ResourceManager { | |
constructor (defs) { | |
this._defs = new Map(defs); | |
this._booted = new Map(); | |
} | |
async get (name) { | |
if (!this._defs.has(name)) { | |
throw new Error(`There is no resource named "${name}".`); | |
} else if (!this._booted.has(name)) { |
const AWS = require('aws-sdk'); | |
// should be configurable | |
const ACCOUNT_ID = ''; | |
const TOPIC_ARN = "arn:aws:sns:eu-central-1:"+ACCOUNT_ID+":"+TOPIC_ID; | |
const REGION = 'eu-central-1'; | |
AWS.config.region = REGION; | |
AWS.config.apiVerison = 'latest'; |
const amqp = require('amqp'); | |
const config = require('./config'); | |
const logger = require('./lib/logger'); | |
const Analysis = require('./lib/Analysis'); | |
const Runner = require('./lib/Runner'); | |
const connection = amqp.createConnection(config.amqp); | |
const runner = new Runner(config.docker); | |
connection.on('error', logger.error); |
socat -x -v UNIX-LISTEN:/tmp/debug-docker.sock,mode=777,reuseaddr,fork,ignoreeof UNIX-CONNECT:/var/run/docker.sock |
COMPOSER_PATH=$(which composer) | |
composer() { | |
options=$(ls -1 /usr/lib/php5/20131226/ | egrep -v 'xdebug|opcache|mysql|wddx|pgsql'| sed -e 's/\(.*\)/ --define extension=\1/' | tr -d '\n') | |
bash -xc "php -n -d memory_limit=-1 $options $COMPOSER_PATH $*" | |
} |
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |
{ | |
/** Should go into roles/your_playbook/files/bastion.json */ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Resources": { | |
"BastionInstance": { | |
"Type": "AWS::EC2::Instance", | |
"Properties": { | |
"AvailabilityZone": "eu-central-1a", | |
"ImageId": "ami-ccc021a3", | |
"InstanceType": "t2.nano", |
#!/bin/bash | |
CONTAINER_NAME=${CONTAINER_NAME:=docker-cleanup} | |
ps="`docker ps -a --format "{{.Names}}: {{.Status}}" | grep ${CONTAINER_NAME}`" | |
run_container () { | |
docker run -d \ | |
--name docker-cleanup \ | |
-v /var/run/docker.sock:/var/run/docker.sock:rw \ | |
-v /var/lib/docker:/var/lib/docker:rw \ |
FROM jenkins:2.3 | |
COPY plugins.txt /usr/share/jenkins/ref/ | |
RUN /usr/local/bin/plugins.sh /usr/share/jenkins/ref/plugins.txt | |
COPY basic-security.groovy /usr/share/jenkins/ref/init.groovy.d/basic-security.groovy |