To enable NAT function, you must DISABLE Source/Destination Check to let this happen.
Resize EBS volume
>>> import base64 | |
>>> s='eyJ1cmwiOiAiaHR0cDovL2RpZ2l0YWwyLmxpYnJhcnkudWNsYS5lZHUvb2FpMl8wLmRvIiwgI | |
nNldF9zcGVjIjogImFpZHNwb3N0ZXJzIiwgImNhbXB1cyI6IFt7InNsdWciOiAiVUNMQSIsICJuYW1lI | |
jogIlVDTEEiLCAicmVzb3VyY2VfdXJpIjogIi9hcGkvdjEvY2FtcHVzLzEwLyJ9XX0' | |
>>> d=base64.b64decode(s) | |
Traceback (most recent call last): | |
... | |
TypeError: Incorrect padding | |
>>> d=base64.decodestring(s + '='*(-len(s) % 4)) | |
>>> d |
export GIT_SSL_NO_VERIFY=true | |
git <xxxx> | |
or env GIT_SSL_NO_VERIFY=true git <xxx> |
To determine your instance's IP addresses using instance metadata | |
Connect to the instance. | |
Use the following command to access the private IP address: | |
GET http://169.254.169.254/latest/meta-data/local-ipv4 | |
Use the following command to access the public IP address: |
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" | |
xmlns:rs="http://www.openarchives.org/rs/terms/"> | |
<rs:ln rel="resourcesync" href="http://example.com/capabilitylist.xml"/> | |
<rs:md capability="resourcelist" modified="2013-01-03T09:00:00Z"/> | |
<url> | |
<!-- this could point directly to the asset if "canonical" used as | |
well. This will allow for a richer end user experience as we'll be | |
able to link directly to assets and embed them. --> | |
<loc>http://example.com/bitstream1.mp4</loc> |
openssl genrsa -des3 -out server.key 2048 | |
openssl req -new -key server.key -out server.csr | |
openssl rsa -in server.key -out server.key.nopass | |
openssl x509 -req -days 1024 -in server.csr -signkey server.key.nopass -out server.crt | |
This will produce an base64 encoded ascii file (server.crt) that can be used as a .pem file. Use the server.key.nopass as the server key, so you don't have to enter the password on webserver restarts. | |
vim /etc/nginx/nginx.conf -- point to it |
#!/bin/bash | |
zone='us-east-1bx' | |
len=${#zone}-1 | |
region=${zone:0:$len} | |
echo "REGION $region" |
import smtpd | |
import asyncore | |
d=smtpd.DebuggingServer(('127.0.0.1', 25), None) | |
try: | |
asyncore.loop() | |
except KeyboardInterrupt: | |
pass |
http://www.docker.com/tryit/ - nice 10 min tutorial intro | |
https://registry.hub.docker.com/ - docker registry, a repo for docker images | |
http://serversforhackers.com/articles/2014/03/20/getting-started-with-docker/ - good post on starting with docker | |
http://www.centurylinklabs.com/what-is-docker-and-when-to-use-it/ - article on use cases for docker | |
http://blog.abhinav.ca/blog/2014/06/17/develop-a-nodejs-app-with-docker/ - interesting tutorial with a typical development workflow, nice how links working directory to container source dir so edits on host will show up in container | |
/var/lib/docker is where the data files for docker live on ubuntu | |
Use "Automated Build Repositories" or official images as a base for your own. You can pull the github repo for the automated build repos and build yourself. Can then modify the Dockerfile to suit your needs. |
never use ec2 - exact_count paramter. This TERMINATED all the running instances except for exact_count number. This can have disatirous results, i hammered the whole cdlib dsc archivesspace server setup in AWs with this option. TODO: NEEDS to be noted in the options docs on this exact_count param. | |
use stete: present to create a new instance | |
not sure what state: running causes | |
always disable api termination | |
set to NOT DELETE on termination on ALL VOULUMES | |
TODO: REBUILD FROM SCRATCH: FRONT END WITH APACHE PROXY (due to nginx mangling of paths see: apache directive = <TODO: lookup> |