Skip to content

Instantly share code, notes, and snippets.

Jens Peter Secher jpsecher

View GitHub Profile
@jpsecher
jpsecher / ubuntu-16-04-ami-contents.md
Last active Dec 17, 2018
Ubuntu 16.04 Xenial AMI contents
View ubuntu-16-04-ami-contents.md

Here is what a freshly Ubuntu 16.04 Xenial AWS Machine Image (specifically ami-0181f8d9b6f098ec4) contains.

First and most importantly, only SSH daemon and DHCP client is running:

ubuntu@ip-172-1-2-3$ netstat -tupln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1240/sshd       
tcp6       0      0 :::22                   :::*                    LISTEN      1240/sshd       
udp        0      0 0.0.0.0:68              0.0.0.0:*                           883/dhclient    
@jpsecher
jpsecher / gluster_volume-problem.md
Last active Jun 9, 2018
Ansible gluster_volume fails during probe peer
View gluster_volume-problem.md

I am hitting the same problem with (which used to work)

- name: Create Gluster volume
  gluster_volume:
    name: "{{ volume_name }}"
    state: present
    host: "{{ inventory_hostname }}"
    bricks: "{{ brick_dir }}/{{ brick_name }}"
    cluster: "{% for host in workers %}{{ host }},{% endfor %}{{ inventory_hostname }}"
    replicas: "{{ workers|length + 1 }}"
@jpsecher
jpsecher / sequence-with-delay.js
Last active Mar 5, 2017
Promise sequence with delay & progress
View sequence-with-delay.js
'use strict';
/**
* Dripwise process a list of items through a processing promise.
* @param {Array(α)} list Items to process.
* @param {int} msDelay Delay in ms between each processing.
* @param {α -> Promise(void)} processing Processer of one item.
* @param {int -> ()} progressReporter Optional function, called with index of item.
* @return {Promise(void)} Promise of the sequential processing.
*/
@jpsecher
jpsecher / mywebapp.tf
Last active Feb 20, 2016
Terraform AWS Docker host setup
View mywebapp.tf
variable "aws_key_name" {
description = "Name of the SSH keypair to use in AWS."
}
variable "safe_ips" {
description = "Comma-separated string of CIDR blocks for trusted IPs."
}
variable "pem_file" {
description = "Local SSH key that matches AWS key."
You can’t perform that action at this time.