You are here
Installation and running TurnKey LXC was easy and successful. But I con't figure out where to go from here.
I tried to install gitlab - what I did:
-
created a /root/inithooks.conf [1]
-
created the container with
lxc-create -n gitlab -t turnkey -- gitlab -i /root/inithooks.conf -l natbr0 -x http://192.168.121.1:314 -
Started the container
lxc-start -n gitlab -d -
Did the proxy / iptables magic
nginx-proxy gitlab.servers.homelinux.net gitlab
host gitlab
gitlab has address 192.168.121.163
iptables-nat add 2222 192.168.121.163:22
Logging in through SSH was successful:
Welcome to Lxc, TurnKey Linux 13.0 / Debian 7.3 Wheezy
System information (as of Mon Dec 28 19:30:48 2015)
System load: 0.01 Memory usage: 5%
Processes: 109 Swap usage: 0%
Usage of /: 0.1% of 1.60TB IP address for br0: 192.168.1.119
IP address for natbr0: 192.168.121.1
Two probably related problems:
- On my router, I direct all port 80 and 443 connections to 192.168.1.119 but will not be able to use my domain to access the gitlab container - keeps connecting and then timeout
- Once I restart the LXC machine (and gitlab explicitly), my connection to the container is lost:
/etc/init.d/nginx restart
Restarting nginx: nginx: [emerg] host not found in upstream "gitlab" in /etc/nginx/sites-enabled/gitlab.servers.homelinux.net:7
nginx: configuration file /etc/nginx/nginx.conf test failed
and
ssh 192.168.121.163
ssh: connect to host 192.168.121.163 port 22: No route to host
Apologies for newbie question - I really would like to understand. I did my homework and learned a lot about nginx on the way but was not able to extract the answer for my question from the material I found.
[1] inithooks.conf
MASTERPASS=aRealPasswd
export ROOT_PASS=$MASTERPASS
export DB_PASS=$MASTERPASS
export APP_PASS=$MASTERPASS
export APP_EMAIL=webmaster@schuerman.net
export APP_DOMAIN=gitlab.servers.homelinux.net
export HUB_APIKEY=SKIP
export SEC_UPDATES=FORCE
Not much of an LXC expert...
OTTOMH it sounds to me like there is something wrong with the config (but I'm guessing you worked that out already). But without knowing more about the appliance TBH I don't know where to start.
However one thing that has just occurred to me is that GitLab is a massive resource hog. It requires at least 1GB RAM and even then takes quite a while to start. I suggest that you try another appliance (such as LAMP) so you can check whether the issues relate to your LXC host or to the GitLab container. Perhaps much of your issue is just GitLab being slow to start?
Add new comment