From kyle at free2.ml Wed Mar 7 22:29:18 2018 From: kyle at free2.ml (Kyle) Date: Wed, 7 Mar 2018 17:29:18 -0500 Subject: [zanata-users] Setting up Zanata with Docker Message-ID: <1f9863fa-c5fd-fbe4-daa3-f9d1f934d96c@free2.ml> I'm trying to set up the Zanata Docker container, but I can't change the mail host. Apparently it's supposed to communicate with the smtp host via an internal IP, but I had it set to localhost, which isn't working. The only thing I found that should allow me to change the mail host is to edit /opt/jboss/wildfly/standalone/configuration/standalone.xml. The problem is that I can't edit the file externally, as my Docker container has 3 such files, and they're all under /var/lib/docker/aufs/something/verylongstringoflettersandnumbers/opt/jboss/... I tried editing the file from inside of the container, but neither bash nor vi will accept any keyboard input, even if I use docker exec -t zanata /bin/bash or docker exec -t zanata /bin/vi Is there another way I should be changing the mail host in the container, something like a web configuration or similar, or am I doing something else wrong when trying to edit the file inside of the container? Thanks for any help. Imetumwa kutoka komputa yangu From pahuang at redhat.com Thu Mar 8 00:05:18 2018 From: pahuang at redhat.com (Patrick Huang) Date: Thu, 8 Mar 2018 10:05:18 +1000 Subject: [zanata-users] Setting up Zanata with Docker In-Reply-To: <1f9863fa-c5fd-fbe4-daa3-f9d1f934d96c@free2.ml> References: <1f9863fa-c5fd-fbe4-daa3-f9d1f934d96c@free2.ml> Message-ID: Hi Kyle, I believe you need to use the i option (interactive) to be able to let docker accept your input. e.g. docker exec -it zanata bash. However if modification is done this way it won't persist. In fact I just checked our Dockerfile, we do support customization of the mail host, port, and credential. See https://github.com/zanata/zanata-docker-files/tree/master/zanata-server under Setup Environment. On Thu, Mar 8, 2018 at 8:29 AM, Kyle wrote: > I'm trying to set up the Zanata Docker container, but I can't change the > mail host. Apparently it's supposed to communicate with the smtp host via > an internal IP, but I had it set to localhost, which isn't working. The > only thing I found that should allow me to change the mail host is to edit > /opt/jboss/wildfly/standalone/configuration/standalone.xml. The problem > is that I can't edit the file externally, as my Docker container has 3 such > files, and they're all under /var/lib/docker/aufs/something > /verylongstringoflettersandnumbers/opt/jboss/... I tried editing the file > from inside of the container, but neither bash nor vi will accept any > keyboard input, even if I use > docker exec -t zanata /bin/bash > or > docker exec -t zanata /bin/vi > Is there another way I should be changing the mail host in the container, > something like a web configuration or similar, or am I doing something else > wrong when trying to edit the file inside of the container? Thanks for any > help. > Imetumwa kutoka komputa yangu > > _______________________________________________ > zanata-users mailing list > zanata-users at redhat.com > https://www.redhat.com/mailman/listinfo/zanata-users > -- Patrick Huang Senior Software Engineer Engineering - Internationalisation Red Hat, Asia-Pacific Pty Ltd Level 1, 193 North Quay Brisbane 4000 Office: +61 7 3514 8278 Fax: +61 7 3514 8199 IRC: pahuang github: github.com/huangp Website: www.redhat.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From kyle at free2.ml Thu Mar 8 06:11:25 2018 From: kyle at free2.ml (Kyle) Date: Thu, 8 Mar 2018 01:11:25 -0500 Subject: [zanata-users] Setting up Zanata with Docker In-Reply-To: References: <1f9863fa-c5fd-fbe4-daa3-f9d1f934d96c@free2.ml> Message-ID: <0941891b-8948-51bb-4da2-d216f44b246f@free2.ml> Patrick Huang aliandika: # In fact I just checked our Dockerfile, we do support customization of the mail host, # port, and credential. See https://github.com/zanata/zanata-docker-files/tree/master/zanata-server # under Setup Environment. Ah thanks. But doesn't this create the container? I know I can export environment variables and use runapp.sh to create a container, but does this dockerfile allow me to change the container I already created without having to destroy it and recreate it? Sorry for the questions ... I'm a bit new to Docker. Would it be better to install Zanata and jboss/Wildfly locally instead for future tests? I do hope to be able to convert this to a production install fairly soon. Imetumwa kutoka dunia From pahuang at redhat.com Thu Mar 8 06:34:51 2018 From: pahuang at redhat.com (Patrick Huang) Date: Thu, 8 Mar 2018 16:34:51 +1000 Subject: [zanata-users] Setting up Zanata with Docker In-Reply-To: <0941891b-8948-51bb-4da2-d216f44b246f@free2.ml> References: <1f9863fa-c5fd-fbe4-daa3-f9d1f934d96c@free2.ml> <0941891b-8948-51bb-4da2-d216f44b246f@free2.ml> Message-ID: Hello Kyle, You should not need to deal with Dockerfile directly unless you want to customize further than what we offer. The docker image you pull down from dockerhub uses this Dockerfile. It expects a number of environment variables to be set or it will use default value. e.g. ZANATA_MAIL_HOST will default to localhost unless you set a value. runapp.sh just makes setting those values easier. You could write your own script or command to set all the values. If you used runapp.sh to launch your container, then you can safely destroy it and recreate a new one. e.g. docker rm -f zanata. All the data will not lose as they will be persisted in database (from zanatadb container) and the real data is kept in a docker volume. Installing Jboss/Wildfly locally means you will have to manage the standalone.xml configuration manually. If you are familiar with JBoss management, then you might give it a try (we have jboss cli scripts to help configuring the server). Otherwise, use the pre-built docker image might be easier to move forward. On Thu, Mar 8, 2018 at 4:11 PM, Kyle wrote: > Patrick Huang aliandika: > # In fact I just checked our Dockerfile, we do support customization of > the mail host, > # port, and credential. See https://github.com/zanata/zana > ta-docker-files/tree/master/zanata-server > # under Setup Environment. > > Ah thanks. But doesn't this create the container? I know I can export > environment variables and use runapp.sh to create a container, but does > this dockerfile allow me to change the container I already created without > having to destroy it and recreate it? Sorry for the questions ... I'm a bit > new to Docker. Would it be better to install Zanata and jboss/Wildfly > locally instead for future tests? I do hope to be able to convert this to a > production install fairly soon. > Imetumwa kutoka dunia > > > _______________________________________________ > zanata-users mailing list > zanata-users at redhat.com > https://www.redhat.com/mailman/listinfo/zanata-users > -- Patrick Huang Senior Software Engineer Engineering - Internationalisation Red Hat, Asia-Pacific Pty Ltd Level 1, 193 North Quay Brisbane 4000 Office: +61 7 3514 8278 Fax: +61 7 3514 8199 IRC: pahuang github: github.com/huangp Website: www.redhat.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From kyle at free2.ml Thu Mar 8 13:24:53 2018 From: kyle at free2.ml (Kyle) Date: Thu, 8 Mar 2018 08:24:53 -0500 Subject: [zanata-users] Setting up Zanata with Docker In-Reply-To: References: <1f9863fa-c5fd-fbe4-daa3-f9d1f934d96c@free2.ml> <0941891b-8948-51bb-4da2-d216f44b246f@free2.ml> Message-ID: Reposting this to the list, as my reply didn't get there for some reason... Thanks very much for the help. I do have a script set up that sets up the environment and then runs runapp.sh. The problem now is that no matter how I set ZANATA_MAIL_HOST, I get an "unexpected error" any time I create a user account as the administrator or try to change an existing user's e-mail address. The problem is that there are no details describing this "unexpected error," so I can't really report it on the issue tracker, nor does this error message give me any idea of what I may be setting incorrectly. I have a postfix configuration on the host that includes both Docker internal IP addresse spaces 172.18.0.1/16 and 172.17.0.0/16 listed in mynetworks, so it should relay without authentication from any Docker container. I have also tried setting ZANATA_MAIL_HOST to both 172.18.0.1 and 172.17.0.1, which are the internal IP addresses listed under the Docker bridge network, but I still see the "unexpected error" with a button to report the problem. I can tell it does have something to do with mail, because it only seems to happen when I change an e-mail address or create a user account as the administrator. Thanks for any help with this. Imetumwa kutoka barua pepe yangu From kyle at free2.ml Thu Mar 8 20:50:06 2018 From: kyle at free2.ml (Kyle) Date: Thu, 8 Mar 2018 15:50:06 -0500 Subject: [zanata-users] Setting up Zanata with Docker In-Reply-To: References: <1f9863fa-c5fd-fbe4-daa3-f9d1f934d96c@free2.ml> <0941891b-8948-51bb-4da2-d216f44b246f@free2.ml> Message-ID: It seems I solved my problem. The "unexpected error" was caused by a couple of misconfigured options in Postfix, which first of all was trusting 172.18.0.1/16 instead of 172.18.0.0/16, and also was sending an invalid hostname as a response to the helo command. The misconfigured address space was what appears to have caused the unexpected error. The invalid hostname just kept mail from being sent, because the recipient's mail server rejected the invalid helo response. Once I found and fixed these misconfigurations, both creating a new user and updating an existing user's e-mail address started working as expected, and the unexpected errors went away. Thanks again for the help. Imetumwa kutoka nyumbani kwangu