Skip to content

WIP: Support for Openshift env with non-root(oracle) user #1630

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

ashageetha
Copy link
Member

@ashageetha ashageetha commented May 29, 2020

Hi,

This PR has fix for Apache Webtier to run in Openshift env with non-root user and with port 8080.
This sample is being used as part of Apache Webtier Setup in Openshift env as per WebLogic Kubernetes Operator Samples: "https://github.com/oracle/weblogic-kubernetes-operator/tree/master/kubernetes/samples/charts/apache-webtier".

Currently tested in below scenario:

  1. docker run -d -e WEBLOGIC_HOST= -e WEBLOGIC_PORT= -p 8080:8080 oracle/apache:12.2.1.3
  2. Openshift env as per '"https://github.com/oracle/weblogic-kubernetes-operator/tree/master/kubernetes/samples/charts/apache-webtier" for a non-SSL usecase.

@ashageetha ashageetha requested a review from mriccell as a code owner May 29, 2020 16:00
@Djelibeybi
Copy link
Member

Is this still a WIP or is it ready for review?

@ashageetha
Copy link
Member Author

Is this still a WIP or is it ready for review?

Its still in review as the changes impact the samples used in Operator repo: https://github.com/oracle/weblogic-kubernetes-operator/tree/master/kubernetes/samples/charts/apache-webtier.
So we are planning to finalize the changes this week.

@rjeberhard rjeberhard self-requested a review July 14, 2020 17:17
@mriccell mriccell requested a review from doxiao July 29, 2020 14:19
Copy link
Member

@doxiao doxiao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks good overall. I have left a couple of comments.


#Expose ports
EXPOSE 80 4433
EXPOSE 8080 4433
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this cause problems for the existing customers when they upgrade to the new version?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When customers upgrade to next version, for eg., say 12.2.1.4, then we plan to provide support for both 80 and 8080.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to make this a generic image for 12.2.1.3, 12.2.14, 14.1.1.0 can we support both 80 and 8080 now?

# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
LoadModule weblogic_module /root/lib/${MOD_WLS_PLUGIN}
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
LoadModule weblogic_module /u01/oracle/lib/mod_wl_24.so
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old version uses MOD_WLS_PLUGIN env var. Is there a reason to change it to the hard-coded value?

touch /etc/sudoers && \
sed -i /etc/sudoers -re 's/^%sudo.*/%sudo ALL=(ALL:ALL) NOPASSWD: ALL/g' && \
sed -i /etc/sudoers -re 's/^root.*/root ALL=(ALL:ALL) NOPASSWD: ALL/g' && \
sed -i /etc/sudoers -re 's/^#includedir.*/## **Removed the include directive** ##"/g' && \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The include directive is commented out. Do we really need to remove it?

@ashageetha ashageetha changed the title WIP - Support for Openshift env with non-root(oracle) user Support for Openshift env with non-root(oracle) user Jul 30, 2020
Copy link
Member

@mriccell mriccell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ashageetha Could you reply to the two outstanding comments from Dongbo?


#Expose ports
EXPOSE 80 4433
EXPOSE 8080 4433
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to make this a generic image for 12.2.1.3, 12.2.14, 14.1.1.0 can we support both 80 and 8080 now?

@ashageetha
Copy link
Member Author

@ashageetha Could you reply to the two outstanding comments from Dongbo?

Sure. We are working on to support both 80 and 8080 this week. I will update you once its ready.

@Djelibeybi Djelibeybi changed the title Support for Openshift env with non-root(oracle) user WIP: Support for Openshift env with non-root(oracle) user Sep 13, 2020
@Djelibeybi
Copy link
Member

I have added WIP to the title of the PR so it doesn't get merged too early. Once you are happy with the code, please remove that and the merge will be allowed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants