Content :
[ | |
{ | |
"name": "Afghanistan", | |
"dial_code": "+93", | |
"code": "AF" | |
}, | |
{ | |
"name": "Aland Islands", | |
"dial_code": "+358", | |
"code": "AX" |
#!/bin/bash | |
echo "Building NGINX along with Echo module" | |
# install prerequisites | |
yum -y install gcc gcc-c++ make zlib-devel pcre-devel openssl-devel | |
# download the Echo module | |
curl -L -O 'https://github.com/openresty/echo-nginx-module/archive/v0.58.tar.gz' | |
tar -xzvf v0.58.tar.gz && rm v0.58.tar.gz | |
mv echo-nginx-module-0.58 /tmp/echo-nginx-module |
# HOWTO: Installing Vault On AWS with S3 backend | |
This is a HOWTO on installing [Vault](https://www.vaultproject.io/https://github.com/hashicorp/vault) on AWS with S3. | |
Components used: | |
* [Vault](https://www.vaultproject.io/https://github.com/hashicorp/vault) | |
* [AWS S3](https://aws.amazon.com/s3/) | |
* [AWS IAM](https://aws.amazon.com/iam/) | |
* [AWS EC2](https://aws.amazon.com/ec2/) | |
* [OpenSSL](https://www.openssl.org/) |
Prerequisites : the letsencrypt CLI tool
This method allows your to generate and renew your Lets Encrypt certificates with 1 command. This is easily automatable to renew each 60 days, as advised.
You need nginx to answer on port 80 on all the domains you want a certificate for. Then you need to serve the challenge used by letsencrypt on /.well-known/acme-challenge
.
Then we invoke the letsencrypt command, telling the tool to write the challenge files in the directory we used as a root in the nginx configuration.
I redirect all HTTP requests on HTTPS, so my nginx config looks like :
server {
How to get techniques from a ncf api | |
You actually need the jsessionid cookie from your navigator (log in to Rudder and inspect your cookie), I will add authentication via rudder api token very soon | |
curl 'https://server.rudder/ncf/api/techniques?path=/var/rudder/configuration-repository/ncf' -k --cookie "JSESSIONID=Valueofyourcookie" | |
To send a technique to a server (see file api.json for exact content): | |
curl -X PUT 'https://server.rudder/ncf/api/techniques' -k --cookie "JSESSIONID=cookie" -d @api.json -v -H "Content-Type: application/json" |
The introduction of our Unicorn management tool, Polycorn.
Photo by Protohiro from Flickr
At Fotopedia, we use Unicorn to serve our main Rails application. Every day, we restart our application several times, spawning and killing hundred of Unicorns. Managing graceful restarts is a complex task, and requires careful monitoring and command. This article introduces our tool Polycorn, a Unicorn management program.
[[MORE]]