deploy the docker image on Kubernates
BruceZu opened this issue · 2 comments
Hey @Klawren,
Excuse me
I can not find any document on https://hub.docker.com/r/bugzilla/bugzilla-base/
I am trying to deploy Bugzilla on Kubernetes using the docker image.
I want to know what port (8080?) and other parameters I should specify when I deploy it on Kubernetes
If there is some description on how to deploy Bugzilla on Docker I can translate them to the scenario of Kubernetes
Thank you!
Hi! @dklawren is on leave for the holidays, but I'll be happy to answer this.
That docker file doesn't contain any code to run stuff. My suggestion would be to add
RUN cpanm Starman
WORKDIR /var/www/html/bugzilla
CMD starman --preload-app --port 8080
I suspect there are a few problems with this, most likely the same blockers for https://bugzilla.mozilla.org/show_bug.cgi?id=1284026
There are one or two issues involving the stateful data in the data/ directory, that I could easily guide someone else to fix. My time is somewhat limited so I haven't been able to do much.
Clarification:
starman is a preforking http written in perl that runs .psgi apps, and bugzilla happens to be a .psgi app
Hi @dklawren,
Thank you so much for your feedback,
I find bugzilla/bugzilla-dev depends on bugzilla/bugzilla-ci which in turn depends on docker-bugzilla-base
I just want use Bugzilla to trace issues and let it work together with Jenkins.
I am not sure which image is better for me.
It would be better to have description on them.
Anyway seems the dev version includes all functions of them.
While I find an issue posted on the page
So with the reference and Dockfile firstly I decide to try https://hub.docker.com/r/dklawren/docker-bugzilla/ on k8s
with a yaml file
[root@k8s-09 ~]# cat bugzilla.yaml
apiVersion: v1
kind: Pod
metadata:
name: bugzilla
labels:
name: bugzilla
spec:
containers:
- name: bugzilla
image: dklawren/docker-bugzilla
ports:
- containerPort: 80
- containerPort: 22
- containerPort: 5900
securityContext:
privileged: true
see logs
[root@k8s-09 ~]# kubectl logs bugzilla
2016-12-28 19:34:55,892 CRIT Supervisor running as root (no user in config file)
2016-12-28 19:34:55,895 INFO supervisord started with pid 1
2016-12-28 19:34:56,898 INFO spawned: 'postfix' with pid 30
2016-12-28 19:34:56,901 INFO spawned: 'httpd' with pid 31
2016-12-28 19:34:56,902 INFO spawnerr: can't find command '/usr/sbin/sshd'
2016-12-28 19:34:56,904 INFO spawned: 'memcached' with pid 32
2016-12-28 19:34:56,907 INFO spawned: 'mysqld' with pid 33
2016-12-28 19:34:56,983 DEBG fd 14 closed, stopped monitoring <POutputDispatcher at 32727696 for <Subprocess at 32676536 with name httpd in state STARTING> (stderr)>
2016-12-28 19:34:56,984 INFO success: postfix entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2016-12-28 19:34:57,253 DEBG 'mysqld' stdout output:
161228 19:34:57 mysqld_safe Logging to '/var/lib/mysql/mysql-error.log'.
2016-12-28 19:34:57,282 DEBG 'mysqld' stdout output:
161228 19:34:57 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2016-12-28 19:34:57,301 DEBG fd 6 closed, stopped monitoring <POutputDispatcher at 32677256 for <Subprocess at 32677040 with name postfix in state RUNNING> (stdout)>
2016-12-28 19:34:57,302 DEBG fd 9 closed, stopped monitoring <POutputDispatcher at 32677616 for <Subprocess at 32677040 with name postfix in state RUNNING> (stderr)>
2016-12-28 19:34:57,302 INFO exited: postfix (exit status 0; expected)
2016-12-28 19:34:57,302 DEBG received SIGCLD indicating a child quit
2016-12-28 19:34:58,302 INFO success: httpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-12-28 19:34:58,303 INFO spawnerr: can't find command '/usr/sbin/sshd'
2016-12-28 19:34:58,303 INFO success: memcached entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-12-28 19:34:58,303 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-12-28 19:35:00,307 INFO spawnerr: can't find command '/usr/sbin/sshd'
2016-12-28 19:35:03,311 INFO spawnerr: can't find command '/usr/sbin/sshd'
2016-12-28 19:35:03,312 INFO gave up: sshd entered FATAL state, too many start retries too quickly
[root@k8s-09 ~]#
Seems the sshd can not work.
I login the container and test
[root@bugzilla /]# ssh bugzilla@localhost -p 22
ssh: connect to host localhost port 22: Connection refused
later I find the
TODO
Enable SSL support.
Enable memcached