Skip to content

Instantly share code, notes, and snippets.

View ghoranyi's full-sized avatar

Gergo Horanyi ghoranyi

View GitHub Profile
@ghoranyi
ghoranyi / AWS Swarm cluster.md
Last active May 31, 2021 05:28
Create a Docker 1.12 Swarm cluster on AWS

This gist will drive you through creating a Docker 1.12 Swarm cluster (with Swarm mode) on AWS infrastructure.

Prerequisites

You need a few things already prepared in order to get started. You need at least Docker 1.12 set up. I was using the stable version of Docker for mac for preparing this guide.

$ docker --version
Docker version 1.12.0, build 8eab29e

You also need Docker machine installed.

Keybase proof

I hereby claim:

  • I am ghoranyi on github.
  • I am ghoranyi (https://keybase.io/ghoranyi) on keybase.
  • I have a public key whose fingerprint is 45F4 D93C 5642 46B4 0061 C1D0 0941 8D21 B7F6 5DD6

To claim this, I am signing this object:

@ghoranyi
ghoranyi / Step 1 | Create cluster.md
Last active September 15, 2018 04:15
Workshop syllabus

In this step we'll create a swarm cluster from two nodes. You should've received access to two nodes in AWS.

  1. SSH in to the first node: ssh -i docker_demo.pem ubuntu@IP1
  2. Figure out the internal IP address of the node: ifconfig and check the eth0 address (10.0....)
  3. Initialize the Swarm cluster: `docker swarm init --listen-addr INTERNAL_IP --advertise-addr INTERNAL_IP
  4. Open a new tab and SSH to the other node: ssh -i docker_demo.pem ubuntu@IP2
  5. Check the internal IP of that node: ifconfig and eth0
  6. Join to the cluster with the command the previous command printed out. Before executing the command, you need to the extend it with the --listen-addr and --advertise-addr parameters (using the internal IP of the second node): docker swarm join TOKEN --listen-addr 10.0.... --advertise-addr 10.0..... node1...
  7. Get back to the first node and verify the results: docker node ls
@ghoranyi
ghoranyi / output
Created March 30, 2017 16:11
Celery SQS reconnection issue debugging
[2017-03-30 18:06:50,821: DEBUG/MainProcess] CanonicalRequest:
GET
/783721547467/celery
Action=GetQueueAttributes&AttributeName=ApproximateNumberOfMessages&Version=2012-11-05
host:queue.amazonaws.com
x-amz-date:20170330T160650Z
host;x-amz-date
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
[2017-03-30 18:06:50,822: DEBUG/MainProcess] StringToSign: