Skip to content

Instantly share code, notes, and snippets.

2014-10-13 17:10:26,936 [ERROR] Command hooks (directoryHooksExecutor.py --path /opt/elasticbeanstalk/hooks/appdeploy/pre/) failed
2014-10-13 17:10:26,936 [DEBUG] Command hooks output:
2014-10-13 17:10:26,937 [ERROR] Error encountered during build of Hook-PreAppDeploy: Command hooks failed
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/cfnbootstrap/construction.py", line 511, in run_config
CloudFormationCarpenter(config, self._auth_config).build(worklog)
File "/usr/lib/python2.6/site-packages/cfnbootstrap/construction.py", line 247, in build
changes['commands'] = CommandTool().apply(self._config.commands)
File "/usr/lib/python2.6/site-packages/cfnbootstrap/command_tool.py", line 113, in apply
raise ToolError(u"Command %s failed" % name)
@wonderb0lt
wonderb0lt / gist:fffa891586d401208414
Created October 17, 2014 12:11
That's why, @Mezgrman.
>>> l = [1, 2, 3, 4]
>>> [i for i in l if i % 2 == 0]
[2, 4]
>>> [for i in l if i % 2 == 0]
File "<input>", line 1
[for i in l if i % 2 == 0]
^
SyntaxError: invalid syntax
<%@page language="java" pageEncoding="UTF-8"%>
<%@page isErrorPage="true" %>
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Page not found</title>
</head>
<body>
@wonderb0lt
wonderb0lt / Application.java
Created December 15, 2014 17:33
The Java app for the cfn/docker sample
package lt.wonderb0.example;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@wonderb0lt
wonderb0lt / spring-boot-docker-cfn-sample.cfn.json
Created December 15, 2014 17:35
The CFN template for the cfn/docker sample
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Infrastructure for the Spring Boot + Docker + CFN sample",
"Parameters": {
"Version": {
"Type": "String",
"Default": "1.0.0"
}
},
"Resources": {
{
"Namespace": "aws:elasticbeanstalk:application:environment",
"OptionName": "echoservice.greetingTemplate",
"Value": "Howdy, World!"
}
{"https://index.docker.io/v1/":{"auth":"your_auth","email":"your_mail"}}
@wonderb0lt
wonderb0lt / common.sh
Created December 15, 2014 17:48
cfn/docker common
#!/bin/sh
set -e
set -x
# This file was originally written by Andreas Mohrhard and used with permission.
copy_context() {
echo "Copying context..."
for f in $CONTEXT; do
if [ ! -f $f ]; then
@wonderb0lt
wonderb0lt / docker.sh
Created December 15, 2014 17:53
cfn/docker script
#!/bin/bash
set -e
# Main configuration for docker run. In addition to this, you need to pass "VERSION" as an environment variable.
if [ -z $VERSION ]; then
echo "*** You need to pass VERSION as an environment variable ***"
exit 1
fi
@wonderb0lt
wonderb0lt / Dockerrun.aws.json
Last active August 29, 2015 14:11
cfn/docker dockerrun
{
"AWSEBDockerrunVersion": 1,
"Image": {
"Name": "some-docker-registry.elasticbeanstalk.com/property-service:latest"
},
"Authentication": {
"Bucket": "docker-artifacts",
"Key": ".dockercfg"
},
"Ports": [