airavata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hitesh Kumar Dasika (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AIRAVATA-2526) Dockerize Airavata PHP Gateway
Date Tue, 10 Oct 2017 00:38:01 GMT

     [ https://issues.apache.org/jira/browse/AIRAVATA-2526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Hitesh Kumar Dasika updated AIRAVATA-2526:
------------------------------------------
    Description: 
h1. *Thought Process*
I am in the process of writing a Dockerfile for Dockerizing Airavata PGA Gateway. My end goal
is to replace the current ansible installation of Airavata PGA Gateway with a Docker Container
PR which is still developing: https://github.com/apache/airavata/pull/122
Some Considerations that I want to make:
1. Through the ansible playbook, firewalld is installed and is configured. But when the app
is installed in a container, there is no need for firewalld as we can access the container
only through the port exposed. The host system can be configured with firewalld which makes
more sense.
2. The second thing is default configurations which need to be copied. There are many conf
files and there are placeholders in those which are replaced by ansible. Whereas in Docker
container creation, such configurations need to be copied without placeholders into the containers.
To achieve this, my plan is to include a volume which is mounted to the container and that
volume will have all the configuration files in it. The user will have the option to change
configurations in those files.
Any Suggestions would be appreciated.

h1. Implemented Steps

>From the above thought process, after having discussions, i came to a conclusion to remove
firewalld from the container for various reasons and also to mount the configuration files
as volumes into the container so as to get the dynamic nature of changes.
For now, having the volumes is the only suitable option.But, when there is an orhcestration
layer in the picture, then the configuration management is provided by the orchestrator(Ex.docker
swarm).
https://github.com/apache/airavata/pull/122
This pull request contains the files needed to be able to run the container. There are some
configuration files in that pull request with default values. This can be changed and the
apache server in the container can be restarted.

h2. Procedure to create and start a container.

{code:java}
docker build -t airavata-pga-docker <path to dockerfile>
{code}

Remember that this Dockerfile looks for a file in scripts/ directory which is run.sh.

To start a docker container, there are some options to be given.
{code:java}
docker run  -it --net=host --name=pga_cont --privileged -v <path to default.conf file>:/etc/httpd/conf.d/default.conf:rw
-v <path to pga_config.php.j2>:/var/www/portals/gateway_id/app/config/pga_config.php:rw
-v <path to pga-vhost.conf.j2>:/etc/httpd/conf.d/pga-gateway_id.conf:rw  airavata-pga-docker
{code}




  was:
h1. *Thought Process*
I am in the process of writing a Dockerfile for Dockerizing Airavata PGA Gateway. My end goal
is to replace the current ansible installation of Airavata PGA Gateway with a Docker Container
PR which is still developing: https://github.com/apache/airavata/pull/122
Some Considerations that I want to make:
1. Through the ansible playbook, firewalld is installed and is configured. But when the app
is installed in a container, there is no need for firewalld as we can access the container
only through the port exposed. The host system can be configured with firewalld which makes
more sense.
2. The second thing is default configurations which need to be copied. There are many conf
files and there are placeholders in those which are replaced by ansible. Whereas in Docker
container creation, such configurations need to be copied without placeholders into the containers.
To achieve this, my plan is to include a volume which is mounted to the container and that
volume will have all the configuration files in it. The user will have the option to change
configurations in those files.
Any Suggestions would be appreciated.

h1. Implemented Steps

>From the above thought process, after having discussions, i came to a conclusion to remove
firewalld from the container for various reasons and also to mount the configuration files
as volumes into the container so as to get the dynamic nature of changes.
For now, having the volumes is the only suitable option.But, when there is an orhcestration
layer in the picture, then the configuration management is provided by the orchestrator(Ex.docker
swarm).
https://github.com/apache/airavata/pull/122
This pull request contains the files needed to be able to run the container. There are some
configuration files in that pull request with default values. This can be changed and the
apache server in the container can be restarted.

h2. Procedure to create and start a container.

{code:shell}
docker build -t airavata-pga-docker <path to dockerfile>
{code}

Remember that this Dockerfile looks for a file in scripts/ directory which is run.sh.

To start a docker container, there are some options to be given.
{code:shell}
docker run  -it --net=host --name=pga_cont --privileged -v <path to default.conf file>:/etc/httpd/conf.d/default.conf:rw
-v <path to pga_config.php.j2>:/var/www/portals/gateway_id/app/config/pga_config.php:rw
-v <path to pga-vhost.conf.j2>:/etc/httpd/conf.d/pga-gateway_id.conf:rw  airavata-pga-docker
{code}





> Dockerize Airavata PHP Gateway
> ------------------------------
>
>                 Key: AIRAVATA-2526
>                 URL: https://issues.apache.org/jira/browse/AIRAVATA-2526
>             Project: Airavata
>          Issue Type: Sub-task
>          Components: PGA PHP Web Gateway
>            Reporter: Hitesh Kumar Dasika
>            Assignee: Hitesh Kumar Dasika
>
> h1. *Thought Process*
> I am in the process of writing a Dockerfile for Dockerizing Airavata PGA Gateway. My
end goal is to replace the current ansible installation of Airavata PGA Gateway with a Docker
Container
> PR which is still developing: https://github.com/apache/airavata/pull/122
> Some Considerations that I want to make:
> 1. Through the ansible playbook, firewalld is installed and is configured. But when the
app is installed in a container, there is no need for firewalld as we can access the container
only through the port exposed. The host system can be configured with firewalld which makes
more sense.
> 2. The second thing is default configurations which need to be copied. There are many
conf files and there are placeholders in those which are replaced by ansible. Whereas in Docker
container creation, such configurations need to be copied without placeholders into the containers.
To achieve this, my plan is to include a volume which is mounted to the container and that
volume will have all the configuration files in it. The user will have the option to change
configurations in those files.
> Any Suggestions would be appreciated.
> h1. Implemented Steps
> From the above thought process, after having discussions, i came to a conclusion to remove
firewalld from the container for various reasons and also to mount the configuration files
as volumes into the container so as to get the dynamic nature of changes.
> For now, having the volumes is the only suitable option.But, when there is an orhcestration
layer in the picture, then the configuration management is provided by the orchestrator(Ex.docker
swarm).
> https://github.com/apache/airavata/pull/122
> This pull request contains the files needed to be able to run the container. There are
some configuration files in that pull request with default values. This can be changed and
the apache server in the container can be restarted.
> h2. Procedure to create and start a container.
> {code:java}
> docker build -t airavata-pga-docker <path to dockerfile>
> {code}
> Remember that this Dockerfile looks for a file in scripts/ directory which is run.sh.
> To start a docker container, there are some options to be given.
> {code:java}
> docker run  -it --net=host --name=pga_cont --privileged -v <path to default.conf file>:/etc/httpd/conf.d/default.conf:rw
-v <path to pga_config.php.j2>:/var/www/portals/gateway_id/app/config/pga_config.php:rw
-v <path to pga-vhost.conf.j2>:/etc/httpd/conf.d/pga-gateway_id.conf:rw  airavata-pga-docker
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message