Installing on Ubuntu 20.04 according to the manual giving in the command:
sudo docker-compose run taskd paster setup-app docker-dev.ini
results with:
Creating network "allura-git_default" with the default driver
Building web
Step 1/9 : FROM ubuntu:18.04
---> 5a214d77f5d7
Step 2/9 : RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends git-core python3-dev gcc libmagic1 libssl-dev libldap2-dev libsasl2-dev libjpeg8-dev zlib1g-dev python3-venv zip subversion python3-svn curl locales sudo && rm -rf /var/lib/apt/lists/*
---> Using cache
---> 9e4c012987ac
Step 3/9 : RUN curl --silent --location https://deb.nodesource.com/setup_10.x | sudo bash - && DEBIAN_FRONTEND=noninteractive apt-get install --yes --no-install-recommends nodejs
---> Using cache
---> 03e2dc378636
Step 4/9 : RUN locale-gen en_US.UTF-8
---> Using cache
---> 754eb37004ea
Step 5/9 : ENV LANG en_US.UTF-8
---> Using cache
---> 80fe4470c51b
Step 6/9 : ENV USER root
---> Using cache
---> a9a65fbce4c4
Step 7/9 : WORKDIR /allura
---> Using cache
---> f3205a90cce3
Step 8/9 : ENV PYTHONUNBUFFERED 1
---> Using cache
---> 336704d9b3c3
Step 9/9 : CMD gunicorn --paste Allura/docker-dev.ini -b :8088 --reload
---> Using cache
---> 6eb3703bbbf8
Successfully built 6eb3703bbbf8
Successfully tagged allura-git_web:latest
WARNING: Image for service web was built because it did not already exist. To rebuild this image you must usedocker-compose build
ordocker-compose up --build
.
Creating allura-git_solr_1 ... done
Creating allura-git_mongo_1 ... done
Creating allura-git_web_1 ... errorERROR: for allura-git_web_1 Cannot create container for service web: create .: volume name is too short, names should be at least two alphanumeric characters
ERROR: for web Cannot create container for service web: create .: volume name is too short, names should be at least two alphanumeric characters
ERROR: Encountered errors while bringing up the project.
The volume names in the docker-compose.yml file are:
So my guess is that the
LOCAL_SHARED_DATA_ROOT
variable isn't getting set. The top of theCHANGES
file explains a bit about it:So I guess you can make sure the .env file is there and correct? Or you can set
export LOCAL_SHARED_DATA_ROOT=./allura-data
(or some other value) in your shell terminal before running the docker-compose commands and see if that helps?Related
Tickets:
#8399ERROR: for allura-git_web_1 Cannot create container for service web: create .: volume name is too short, names should be at least two alphanumeric characters
ERROR: for web Cannot create container for service web: create .: volume name is too short, names should be at least two alphanumeric characters
ERROR: Encountered errors while bringing up the project.
What version of docker-compose do you have? It'd be nice for us to figure out if older versions don't automatically use the
.env
file or if there's something else going on.In the commands you shared above, I think
sudo
is making the exported environment variable not pass through to the docker-compose command. Here's a few possible ways to make it work: https://askubuntu.com/questions/57915/environment-variables-when-run-with-sudo#57938 The second answer withsudo -E ...
seems pretty convenient if it works for you.Thanks for the version number - I think us developers can make some improvements (from https://docs.docker.com/compose/environment-variables/ it seems like the
.env
file location changed on 1.28 which is why it wasn't found on yours. Maybe we could use inline defaults)Anyway back to your latest error. The "paster" executable should be available (inside the docker container) if all the previous commands ran correctly. My guess is that because of the sudo & environment problems earlier, the earlier commands didn't all work right. Could you try starting the instructions over from the beginning? Using your new sudo stuff of course.
You can also check out these docker instructions if you want to try running without sudo: https://docs.docker.com/engine/install/linux-postinstall/
I added my user to docker's group and after that, only
docker-compose build
required sudo.This time, I reached further. After:
I got:
In the manual, I read:
So I went and entered:
into the address bar of my web browser. That IP address is the one of my server machine running docker. The address was automatically turned into:
The resulting web page was:
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED
Ok good progress :)
See note 2 at https://forge-allura.apache.org/docs/getting_started/installation.html#first-run That should help with different IP addresses
I added these two lines suggested in the note 2. Thereafter, I did:
as suggested and what I did get was:
ERROR: for allura-git_web_1 b'Cannot restart container c12c96ff2d17ed189dc507ad278202c6c9678d4ac3bc85f7088e20cb8519c7ef: driver failed programming external connectivity on endpoint allura-git_web_1 (3163d2222fca567087b3c9db1758af36d0f3d6aaf54649de0230d83b5b6ad117): Bind for 0.0.0.0:8088 failed: port is already allocated'
I wanted to see what's listening at 8088 and got this answer:
I haven't seen that error before, I think the 'web' container should be the only thing using that port. Maybe try
docker-compose down
and thendocker-compose up -d
to start the containers again? Otherwise there are several other possible fixes at https://stackoverflow.com/questions/46176584/docker-bind-for-0-0-0-04000-failed-port-is-already-allocatedThis time, I got allura up:
I logged in as admin1, created a new project and imported it successfully from GitHub. However, I can't clone it. Initially, the address for cloning was localhost:8080... and I changed it in docker-dev.ini to allura.tennis24.ee.... This is my domain. I configured nginx to catch all the web requests to allura.tennis24.ee and forward them to localhost:8088. I'm not sure whether I should also forward something to 8080. Anyway, the address suggestion git clone http://allura.tennis24.ee/git/p/poster/puud.kalmer poster-puud.kalmer doesn't work. I also tried it with 8080 and no success. If I go to the address http://allura.tennis24.ee/p/poster/puud.kalmer/ci/master/tree/, I see the code in Allura. If I try to clone the code, I get:
That URL looks right to me. I think you want to forward everything to port 8080 though. That port is the docker http server which handles git request as well as forwarding internally to 8088 for regular webpages.
If that doesn't work still, I'd recommend looking at the docker-compose logs, specifically for the 'http' container (maybe 'web' too) and see if it has any clues.
In order to make it more comfortable for you to advice, I post some information.
I did
docker-compose logs
and found these things for web_1 and http_1:Regarding to configuration, I have these rows regarding to web addresses and ports in docker-dev.ini:
Regarding to the same things, I have the following configuration rows in production.ini:
nginx configuration:
}
If I change 8088 into 8080 in that file then for the address http://allura.tennis24.ee/git/p/poster/puud.kalmer, I get:
Port 8080 is what you want everything to go through. When you have it set to 8080 and try to access the git repository, what logs show up in the 'http' container log?
Also when you are trying the git URL, I wouldn't expect it to work in a browser. It provides git data, so it may only work with the git tool. Try
git ls-remote http://allura.tennis24.ee/git/p/poster/puud.kalmer
that actually works for me currently so you probably have it working right now!Really, using git, the address worked, I could push and the data got pushed.
After that, I rebooted the server machine and had to perform the following tasks in order to get allura running again:
The system is up again. However, there's another problem now: the pushed code is gone. I don't see the repo poster anymore. Only the preinstalled four repos for admin1 are left.
The
... setup-app ...
command clears mongodb and sets up initial data, so you don't want to run that each time. I think you can just rundocker-compose up -d
after you set LOCAL_SHARED_DATA_ROOT.The ./allura-data/ directories should still contain the git repositories that you committed & pushed to, in case you need to recover that. But probably best to remove those directories and re-push any new commits (assuming your local checkout has the new commits still available to push again).
Some of the issues reported here have been addressed with updates via [#8411]
Related
Tickets:
#8411