I thought I’d try to install Proxmox 4 on DigitalOcean. How I struck on that idea was very convoluted, and I don’t have a specific purpose for doing so, but if you want LXC containers instead of Docker or rkt, and you want a full set of web admin tools, this might not be a bad way to go.
By the way, if you like this write up and don’t already use DigitalOcean, feel free to thank me by signing up with my referral link. That will give you a $10 getting started credit to experiment with and give me some referral credit to use for my future bill with them.
Thinking about it, I don’t expect DigitalOcean to support running KVM on their VMs (which are already KVM). I do expect the LXC containers to work. Also, there is likely to be some networking difficulty due to having only one external and one internal IP. However, that shouldn’t stop you from seeing it as a good idea. I’ve previously used LXC directly with only a single IP and before that Solaris Containers with only a single IP. Futher discussion on that point will come later.
DigitalOcean doesn’t let you install any distribution that you might want, so installing from the Proxmmox ISO was out of the question. However, Proxmox publishes directions for installing it on top of Debian Jessie, which is a supported distribution on DigitalOcean.
Here are those directions:
They are painless to follow and just work.
Here is a shortened version of them:
- Open /etc/hosts and change the 127.0.1.1 line to replace that IP with your external IP.
- Run the following shell commands:
- You will be asked about configuring postfix. If you don’t know what to choose, just choose for it to be a local only postfix server.
echo "deb http://download.proxmox.com/debian jessie pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
wget -O- "http://download.proxmox.com/debian/key.asc" | apt-key add -
apt-get update && apt-get dist-upgrade
apt-get install proxmox-ve ntp ssh postfix ksm-control-daemon open-iscsi openvswitch-switch
Note: If you are following the guide on the proxmox site, I’ve added one additional package to be installed, openvswitch-switch. I will explain more about that later.
At that point, you can log into the web admin page. Use https://your-ip:8006/.
At this point you can log in, look around, and after configuring a local storage location, downloading templates works correctly. Unfortunately, Cceating a CT (lxc) doesn’t work initially. The dialog requires choosing a bridge and there are no bridges.
At this point I followed the guide for using OpenVSwitch here and installed OpenVSwitch then configured a switch that isn’t connected to a “physical” interface. From the command line,
I then created a vlan on the switch, so that the host could use the new switch.
Now, when creating the container, choose the vswitch bridge. Also, set the vlan tag of the containers interface to the number used on the host. Now you are good to go.
Using a vswitch not attached to a physical interface gets you private networking between your containers, but it still doesn’t solve what to do about only having a single IP. Previously my tactic was to have nginx in a container be the designated front end answering on port 80 and 443. This will mean setting up iptables on the host to forward those ports to the front end container. Then, in the nginx config for that container, I would proxy-pass by domain/hostname through to the various web service containers I was running (for instance, personal web site, project websites, and other web based software I might be using for monitoring, etc). This strategy can also be extended for other services like email, DNS, and so on.
Trying some inline processing.js.
From here :
UPDATE pg_database SET datistemplate=FALSE WHERE datname='template1';
DROP DATABASE template1;
CREATE DATABASE template1 WITH owner=postgres template=template0 encoding='UTF8';
UPDATE pg_database SET datistemplate=TRUE WHERE datname='template1';
Download Postgres.app from postgresapp.com. Unzip into /Applications, then run it.
To get psycopg2 to then install do:
PATH=$PATH:/Applications/Postgres.app/Contents//Versions/9.3/bin/ pip install psycopg2
Tada! Your done and without having had to use fink or brew.
I realized that when searching for python and lzo, my github page is the first link. I’ve also noticed that people keep forking my github version and that there is no PyPI entry for python-lzo.
So, I decided it is fair to consider myself the maintainer for python-lzo and have registered it as a PyPI package. Find it here: https://pypi.python.org/pypi/python-lzo/1.08.
I guess the next steps will be to setup travisci, update the setup.py, add python3 compatibility and find out what changes the people forking it are making.
This is a note for my future reference.
zone example.com/IN: journal rollforward failed: journal out of sync with zone
zone example.com/IN: not loaded due to errors.
While named isn’t running, remove the
.jnl file for the example.com zone. It will be in the same directory as the zone files. Restart named and the error should be gone.
This error occurs if you have dynamic entries (say pushed by in by a DHCP server or other automatic mechanism) in a zone and then also change the zone files on disk (say deploying updates from a manual edit).
To prevent this in the future, freeze a zone before changing the zone file, then thaw after.
rndc freeze example.com
rndc reload example.com
rndc thaw sxample.com
Where I learned about this: thedumbterminal.co.uk
How to convert audio format in a video file:
ffmpeg -i input.mkv -vcodec copy -acodec ac3 -ab 448k output.mkv