11/30/2016: Using hyper.sh for software development
Hyper.sh is a secure container hosting service. What makes it different from AWS (Amazon Web Services) is that you don’t start servers, but start docker images directly from Docker Hub or other registries. Hyper.sh is running the containers in a new way, in which multi-tenants’ containers are inherently safe to run side by side on bare metal, instead of being nested in VMs.
- Create a Docker volume to hold your project files.
./hyper volume create --name=development
- Create a Docker container where you can perform work. This container is about 25 cents per hour.
./hyper run --size m2 -it --rm --volume development:/projects centos /bin/bash
- Create SSH file so that GitHub knows who you are.
mkdir ~/.ssh
chmod 700 ~/.ssh
cat << EOF > ~/.ssh/id_rsa
-----BEGIN RSA PRIVATE KEY-----
XTz8S7HbpSj3bz6PqT5AxIGk7jnCyLvjIuO9tk3wxFdYgiCkSpHE44Wku32MLJct
...
Bh0z0XMCgYEAjCsLw+zhObeKdTuhtmzzpHu7jaI97OET7+5MwGFZbzgcdf9f37FN
dEIHo1XYuxRpqFXMNz6kwZgs8k8+uPM4C8fu4r4UHqVbdZwzM5pvhQoo+qzvePNL
TmeVsBVUQPTs6K1IO3MEPfIN4m366MselXW0tLcvPi6hOPkl5Kzqj+o=
-----END RSA PRIVATE KEY-----
EOF
chmod 600 ~/.ssh/id_isa
- Install git so you can pull a project from GitHub.
yum install -y git
git config --global user.email "david.medinets@gmail.com"
git config --global user.name "medined"
git config --global push.default simple
git clone git@github.com:medined/medined.github.io.git
That’s - do your work - then git commit
and exit the
Docker container.
PS - this entry was written inside a hyper.sh container.
11/29/2016: Running web server for one dollar a month
Hyper.sh is a secure container hosting service. What makes it different from AWS (Amazon Web Services) is that you don’t start servers, but start docker images directly from Docker Hub or other registries. Hyper.sh is running the containers in a new way, in which multi-tenants’ containers are inherently safe to run side by side on bare metal, instead of being nested in VMs.
Running a $1/month web server
- Create a Docker volume
./hyper volume create --name=tiny-web-server
-
Create an index.html file on the volume.
- Open a shell that accesses the Docker volume
./hyper run --size s1 -it --rm --volume tiny-web-server:/www centos /bin/bash
- Create the file.
echo "Hello World" > /www/index.html
- Run the web server. Note that it won’t be accessible to the Internet yet.
./hyper run --size s1 --detach --name tiny-web-server -p 80 --volume tiny-web-server:/www fnichol/uhttpd
-
On the hyper.sh website, allocate one of your floating IP addresses.
-
Also on the hyper.sh website, attach a floating IP address to the tiny-web-server container.
Visit your equivalent of http://209.177.88.159/index.html.
That page costs about $1/month to host. ::))