Allow routing allocations:
curl -XPUT localhost:9200/_cluster/settings -d '{
"transient" : {
"cluster.routing.allocation.enable" : "all"
}
}'
#! /bin/bash | |
SHA1=$1 | |
BUILD_NUM=$2 | |
# Push image to Docker Registry | |
docker commit `docker run -d portaldev_web` $DOCKER_REPO:$SHA1 | |
docker push $DOCKER_REPO:$SHA1 | |
# Create Elastic Beanstalk zipped source bundle | |
DOCKERRUN_FILE=Dockerrun.aws.json |
curl -skL -X GET https://raw.githubusercontent.com/docker/docker/master/contrib/completion/bash/docker > `brew --prefix`/etc/bash_completion.d/docker |
echo "DOCKER_STORAGE=overlay" >> /var/lib/boot2docker/profile` |
sudo btrfs filesys show | |
sudo btrfs filesys balance start -dusage=1 /var/lib/docker | |
Allow routing allocations:
curl -XPUT localhost:9200/_cluster/settings -d '{
"transient" : {
"cluster.routing.allocation.enable" : "all"
}
}'
DOCKER_BUILDTAGS=btrfs_noversion AUTO_GOPATH=1 BINPATH=. make binary |
$ systemctl cat etcd | |
# /usr/lib64/systemd/system/etcd.service | |
[Unit] | |
Description=etcd | |
[Service] | |
User=etcd | |
PermissionsStartOnly=true | |
Environment=ETCD_DATA_DIR=/var/lib/etcd | |
Environment=ETCD_NAME=%m |
#cloud-config | |
coreos: | |
units: | |
- name: rethinkdb-create-fleet-units.service | |
command: start | |
content: | | |
[Unit] | |
After=docker.service | |
ConditionFileIsExecutable=/srv/rethinkdb-create-fleet-units.sh | |
ConditionFileNotEmpty=/srv/[email protected] |
First, read the CoreOS page on ECS:
https://coreos.com/docs/running-coreos/cloud-providers/ecs/
Install the aws commandline tool:
which aws || pip install awscli
Make sure you have your AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
defined in your shell environment.
#!/bin/bash -e | |
tmpdir=/tmp/add-xfleet-conflicts | |
mkdir -p $tmpdir | |
fleetctl list-units -fields=unit -no-legend | grep -v -e '@\|deis' | cut -d. -f1-2 | sort | uniq | while read name ; do | |
max=$(fleetctl list-machines -no-legend | wc -l) | |
count=$(fleetctl list-units -fields=unit -no-legend | grep -e "^$name" | wc -l) | |
fleetctl list-units -fields=unit -no-legend | grep -e "^$name" | sort -n | while read service; do | |
tmpfile=$tmpdir/$service | |
fleetctl cat $service >| $tmpfile | |
if ! grep X-Fleet $tmpfile > /dev/null; then |