By: Yamil Díaz Aguirre user 15 Jan 2020 at 11:41 a.m. CST

6 Responses
Yamil Díaz Aguirre gravatar
I'm trying to automate a Gluu Server installation from a script with Terraform. However, Gluu requires to run in a chroot container with the `service gluu-server-3.1.6 login` command. As a consequence, the subsequent commands won't run. So the question here is, how can I execute commands in the Gluu chroot container immediately after that I ran `service gluu-server-3.1.6 login`? Or in another way, Is it possible to do a Gluu installation without running chroot container?

By Michael Schwartz Account Admin 15 Jan 2020 at 11:55 a.m. CST

Michael Schwartz gravatar
You could use the containers. Or you could start with the source, take a close look at what we do in `setup.py` and make your own deployment strategy.

By Yamil Díaz Aguirre user 15 Jan 2020 at 12:53 p.m. CST

Yamil Díaz Aguirre gravatar
I already saw the `setup.py` file. I notice that you are changing permissions to some directories. I understand now why you are using a chroot container to avoid altering the system root permissions. I think it could be hard to do my deployment strategy by modifying your setup.py, which has a lot of configuration. Everything seems to point out that the most viable option will be to use the Gluu Server dockerized.

By Michael Schwartz Account Admin 15 Jan 2020 at 12:55 p.m. CST

Michael Schwartz gravatar
The goal of the chroot is to have an easy way for developers to install the Gluu Server, and to have everything in one folder, versus scattered everyone on the file system.

By Michael Schwartz Account Admin 15 Jan 2020 at 3:34 p.m. CST

Michael Schwartz gravatar
We've seen attempts to do this, and no one has been successful. I don't think it's a good idea. Use the containers... that's a much better idea.

By Yamil Díaz Aguirre user 15 Jan 2020 at 3:58 p.m. CST

Yamil Díaz Aguirre gravatar
Ok, in that case, I'll consider using containers. But before to go forward, it wouldn't be possible to do something like this? `chroot /opt/gluu-server-3.1.6/ /bin/bash -c "su - -c 'cd /install/community-edition-setup && ./setup.py -n'"`

By Adrian Alves staff 29 Jan 2020 at 10:08 a.m. CST

Adrian Alves gravatar
Hello Yamil everything is scripted and managed by setup.py