Re: Openshift console redirect

2016-11-11 Thread Robson Ramos Barreto
Thank you Jessica

In this case I'll try create the redirect from a container webserver.

Regards

On Thu, Nov 10, 2016 at 6:05 PM, Jessica Forrester <jforr...@redhat.com>
wrote:

> Nothing that is part of the master configuration, there is an RFE here
> https://trello.com/c/qxRMizmK
>
> If you are running with HAProxy in front of your masters you can configure
> that to do the redirect http://stackoverflow.com/questions/13227544/
> haproxy-redirecting-http-to-https-ssl
>
> On Thu, Nov 10, 2016 at 2:14 PM, Robson Ramos Barreto <
> robson.rbarr...@gmail.com> wrote:
>
>> Hello Guys
>>
>> We are running openshift console on port 443 [1] successful.
>>
>> Is there any way to redirect openshift console from port 80 to 443 ?
>>
>> Just for the user doesn't  get the message error: "Application is not
>> available" when they access the openshift console url on http port.
>>
>> Thank you
>>
>> [1] https://blog.openshift.com/run-openshift-console-port-443/
>>
>> ___
>> users mailing list
>> users@lists.openshift.redhat.com
>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>
>>
>
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Openshift console redirect

2016-11-10 Thread Robson Ramos Barreto
Hello Guys

We are running openshift console on port 443 [1] successful.

Is there any way to redirect openshift console from port 80 to 443 ?

Just for the user doesn't  get the message error: "Application is not
available" when they access the openshift console url on http port.

Thank you

[1] https://blog.openshift.com/run-openshift-console-port-443/
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: Networking tab

2016-11-09 Thread Robson Ramos Barreto
I understand now. LoL

Thank you

On Wed, Nov 9, 2016 at 12:06 PM, Jessica Forrester <jforr...@redhat.com>
wrote:

> Its just a header, its not a supposed to be a link.
>
> On Wed, Nov 9, 2016 at 9:05 AM, Robson Ramos Barreto <
> robson.rbarr...@gmail.com> wrote:
>
>> Sure
>>
>> How could I figure out why this sub-section header from Applications menu
>> is unavailable to click/access ?
>>
>> Thank you
>>
>>
>> On Wed, Nov 9, 2016 at 11:56 AM, Jessica Forrester <jforr...@redhat.com>
>> wrote:
>>
>>> Networking is just a sub-section header under the Applications menu,
>>> Networking contains the Routes and Services menu items.
>>>
>>> On Wed, Nov 9, 2016 at 8:44 AM, Robson Ramos Barreto <
>>> robson.rbarr...@gmail.com> wrote:
>>>
>>>> Hello Guys,
>>>>
>>>> I have finished the upgrade from 3.2 to 3.3 successful and I don't
>>>> understand the networking tab at applications menu why it is unavailable to
>>>> click.
>>>>
>>>> From metrics pod tab I can see metrics to both Memory, CPU and Network
>>>> normally.
>>>>
>>>> I have verified the upgrade and everything seems be working
>>>>
>>>> Thank you
>>>>
>>>>
>>>>
>>>> ___
>>>> users mailing list
>>>> users@lists.openshift.redhat.com
>>>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>>>
>>>>
>>>
>>
>
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: Networking tab

2016-11-09 Thread Robson Ramos Barreto
Sure

How could I figure out why this sub-section header from Applications menu
is unavailable to click/access ?

Thank you

On Wed, Nov 9, 2016 at 11:56 AM, Jessica Forrester <jforr...@redhat.com>
wrote:

> Networking is just a sub-section header under the Applications menu,
> Networking contains the Routes and Services menu items.
>
> On Wed, Nov 9, 2016 at 8:44 AM, Robson Ramos Barreto <
> robson.rbarr...@gmail.com> wrote:
>
>> Hello Guys,
>>
>> I have finished the upgrade from 3.2 to 3.3 successful and I don't
>> understand the networking tab at applications menu why it is unavailable to
>> click.
>>
>> From metrics pod tab I can see metrics to both Memory, CPU and Network
>> normally.
>>
>> I have verified the upgrade and everything seems be working
>>
>> Thank you
>>
>>
>>
>> ___
>> users mailing list
>> users@lists.openshift.redhat.com
>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>
>>
>
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Networking tab

2016-11-09 Thread Robson Ramos Barreto
Hello Guys,

I have finished the upgrade from 3.2 to 3.3 successful and I don't
understand the networking tab at applications menu why it is unavailable to
click.

>From metrics pod tab I can see metrics to both Memory, CPU and Network
normally.

I have verified the upgrade and everything seems be working

Thank you
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Expose port range to containers and services

2016-09-13 Thread Robson Ramos Barreto
Hello Guys

I'm trying create a FTP container in openshift and it need an open port
range to passive mode connections so I would like to know if Is there any
way to set up port range to Pods and Services ?

I know that if I specify one port each in openshift it's possible

In docker I'm able to do like:

$ docker run -d --name ose-ftp -p 21:21 -p 3-30100:3-30100 ose-ftp

In Dockerfile I have:

$ grep EXP Dockerfile
EXPOSE 21 3-30100

I tried something like in openshift template:

pod.json
...
  "spec": {
"containers": [
  {
"ports": [
  {
"containerPort": 21,
"protocol": "TCP"
  },
"ports": [
  {
"containerPort": "3-30100",
"protocol": "TCP"
  }
...

$ oc create -f pod.json
unable to decode "pod.json": [pos 440]: json: expect char ',' but got char
'-'

I tried with colon instead of dash ("containerPort": "3:30100",) but
same error

And after that, I'll need to configure the port range in service template
too

Thank you
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: s2i build set hostname

2016-09-09 Thread Robson Ramos Barreto
2016-09-09 16:13 GMT-03:00 Skarbek, John <john.skar...@ca.com>:

> Robson,
>
> What is it that you are trying to accomplish? In your prior thread you
> mention the use of setting up an ftp docker image. I think there’s a
> misunderstanding for the purpose of s2i here.
>
You are right. I'm sorry for the confusion here. To simplify, I just need
to set a custom hostname during a build of the image (if it is possible).

> s2i build is not going to build the Dockerfile that you posted. s2i is
> meant to take an existing docker image that is already built, and create a
> runnable application. It’s a builder for an application container.
>
I see. I did know about that. Thank you


>
> --
> John Skarbek
>
> On September 9, 2016 at 12:58:27, Robson Ramos Barreto (
> robson.rbarr...@gmail.com) wrote:
>
> Sure,
>
> I'm trying create an image with ssh because I think that sshd is more easy
> to test
>
> Follow the code so far:
>
> # cat Dockerfile
>
> # ose-ftp-rhel7
> FROM rhel7.2
>
> ENV BUILDER_VERSION 1.0
> ENV HOSTNAME ose-ftp.example.com
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__ose-2Dftp.example.com=DQMFaQ=_hRq4mqlUmqpqlyQ5hkoDXIVh6I6pxfkkNxQuL0p-Z0=8IlWeJZqFtf8Tvx1PDV9NsLfM_M0oNfzEXXNp-tpx74=_iU9xf0GzcebBNDBdsmcTnQ0IrzCflnn8SAyRzqeiew=jsORd7D-3eZfNWDiEIvWO11SpaHlcosNvoIWtQKzxwY=>
>
> RUN INSTALL_PKGS="openssh-server ipa-client" && KADMIN_PASS="" &&
> HOSTNAME="ose-ftp.example.com
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__ose-2Dftp.example.com=DQMFaQ=_hRq4mqlUmqpqlyQ5hkoDXIVh6I6pxfkkNxQuL0p-Z0=8IlWeJZqFtf8Tvx1PDV9NsLfM_M0oNfzEXXNp-tpx74=_iU9xf0GzcebBNDBdsmcTnQ0IrzCflnn8SAyRzqeiew=jsORd7D-3eZfNWDiEIvWO11SpaHlcosNvoIWtQKzxwY=>"
> && \
> yum install -y $INSTALL_PKGS && yum clean all -y
> #ipa-client-install --server=ipaserver.example.com
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__ipaserver.example.com=DQMFaQ=_hRq4mqlUmqpqlyQ5hkoDXIVh6I6pxfkkNxQuL0p-Z0=8IlWeJZqFtf8Tvx1PDV9NsLfM_M0oNfzEXXNp-tpx74=_iU9xf0GzcebBNDBdsmcTnQ0IrzCflnn8SAyRzqeiew=czDfQMTpFvRptgN-fgaXkEcZtbiwfV2fifOzM6K7Mtc=>
> --password=$KADMIN_PASS --mkhomedir --domain=example.com
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__example.com=DQMFaQ=_hRq4mqlUmqpqlyQ5hkoDXIVh6I6pxfkkNxQuL0p-Z0=8IlWeJZqFtf8Tvx1PDV9NsLfM_M0oNfzEXXNp-tpx74=_iU9xf0GzcebBNDBdsmcTnQ0IrzCflnn8SAyRzqeiew=02M2gQiFYZxUuTtJ5s3thdw1ll2DWCFMoWlg1G4ILxA=>
> --unattended
>
> LABEL io.openshift.s2i.scripts-url=image:///usr/local/s2i
>
> COPY ./.s2i/bin/ /usr/local/s2i
>
> USER root
>
> EXPOSE 22
>
> CMD ["/usr/sbin/sshd", "-D"]
>
>
> # cat .s2i/bin/run
> exec /usr/sbin/sshd -D
>
> # make
> # docker run -d -P ose-ftp-rhel7-candidate
>
> and so I have the image with the ssh service working but no hostname
> changed
>
> Perhaps should I put the set hostname in the .s2i/bin/run
>
> ---
>
> Another thing that I'm figuring out is when I run:
>
> # s2i build . rhel7 ose-ftp --loglevel=3
>
> This isn't running the RUN section from dockerfile to install the
> packages, only if I run the: # make command that it have effect.
>
> Is it normal ?
>
> From s2i build command I'm not getting any error
>
> Thank you
>
>
>
> 2016-09-09 12:28 GMT-03:00 Jonathan Yu <jaw...@redhat.com>:
>
>> Hey Robson,
>>
>> I see, thanks for the context. I'm unfamiliar with ipa-client, so will
>> just share two thoughts:
>>
>> 1. The hostname is fixed for the lifetime of the container (that is, once
>> the pod starts, it will keep its hostname until it crashes or is stopped)
>> 2. If you want to choose a hostname, consider using the PetSet feature:
>> http://kubernetes.io/docs/user-guide/petset/
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__kubernetes.io_docs_user-2Dguide_petset_=DQMFaQ=_hRq4mqlUmqpqlyQ5hkoDXIVh6I6pxfkkNxQuL0p-Z0=8IlWeJZqFtf8Tvx1PDV9NsLfM_M0oNfzEXXNp-tpx74=_iU9xf0GzcebBNDBdsmcTnQ0IrzCflnn8SAyRzqeiew=5j2Lh5b188xg8qB1QTJ2ZUinb-m3BfW79xZPQeGD0GI=>
>> - this requires OpenShift Origin 1.3, or the yet-to-be-released OpenShift
>> Container Platform 3.3
>>
>> However, I'm unsure how this relates to s2i. Would it be possible for you
>> to share any code or working example that you have put together so far?
>>
>> On Fri, Sep 9, 2016 at 7:35 AM, Robson Ramos Barreto <
>> robson.rbarr...@gmail.com> wrote:
>>
>>> Hello Jonathan
>>>
>>> Thank you for your time.
>>>
>>> I'm trying to install the ipa-client on which must have a fixed hostname
>>>
>>> My final goal is set up a FTP container with cen

Re: s2i build set hostname

2016-09-09 Thread Robson Ramos Barreto
Hello Jonathan

Thank you for your time.

I'm trying to install the ipa-client on which must have a fixed hostname

My final goal is set up a FTP container with centralized authentication as
I asked for advice:

http://lists.openshift.redhat.com/openshift-archives/users/2016-September/msg00026.html

Thank you

2016-09-08 17:36 GMT-03:00 Jonathan Yu <jaw...@redhat.com>:

> Hey Robson,
>
> Can you elaborate more on what you're trying to do and why you need to
> change the hostname?
>
> I'm no expert, but I believe changing the hostname requires root, and s2i
> builds typically run as a nonprivileged user, so it's likely not possible
> to change the hostname from within the build at build time.
>
> On Thu, Sep 8, 2016 at 1:28 PM, Robson Ramos Barreto <
> robson.rbarr...@gmail.com> wrote:
>
>> Hello Guys,
>>
>> Is there any way to set hostname when building a s2i ?
>>
>> Thank you
>>
>> ___
>> users mailing list
>> users@lists.openshift.redhat.com
>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>
>>
>
>
> --
> Jonathan Yu, P.Eng. / Software Engineer, OpenShift by Red Hat / Twitter
> (@jawnsy) is the quickest way to my heart <https://twitter.com/jawnsy>
>
> *“A master in the art of living draws no sharp distinction between his
> work and his play; his labor and his leisure; his mind and his body; his
> education and his recreation. He hardly knows which is which. He simply
> pursues his vision of excellence through whatever he is doing, and leaves
> others to determine whether he is working or playing. To himself, he always
> appears to be doing both.”* — L. P. Jacks, Education through Recreation
> (1932), p. 1
>
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


s2i build set hostname

2016-09-08 Thread Robson Ramos Barreto
Hello Guys,

Is there any way to set hostname when building a s2i ?

Thank you
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


FTP access

2016-09-06 Thread Robson Ramos Barreto
Hello Guys,

I would like of give FTP access to the developers to manage the volumes
files instead of oc rsync on openshift enterprise platform

My ideia is create a container witch FTP and there mount the volumes in the
user home via nfs.

Did someone already do something like that ?

What do the better way to do that ?

Thank you
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Docker registry external access from a trust certificate

2016-09-06 Thread Robson Ramos Barreto
Hello Guys,

I have a wildcard certificate and it's ok for both web console, router and
metrics.

I followed the doc [1] and was able to access the docker registry
externally but from an untrusted certificate (self-signed certificate).

In the doc, first I created the passthrough route what should be a valid
certificate from the router, after I created the self-signed certificate to
the docker registry and finally I was able to access the registry
externally but from an untrusted certificate

On the other hand, the metrics use self-signed certificate and the route is
re-encrypt [2]

I created the re-encrypt route to the docker registry too and it seems be
ok.

My local docker is configured with --add-registry instead of
--insecure-registry and now I'm able to login and push images to the
registry from a trust certificate

Is it recommended to work in production or should I deploy the registry
directly with the custom certificate ?

[1]
https://docs.openshift.com/enterprise/latest/install_config/install/docker_registry.html#exposing-the-registry

[2]
https://docs.openshift.com/enterprise/latest/install_config/cluster_metrics.html#metrics-reencrypting-route
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: Multi-Tenant Cluster: Create a separate docker registry for every project?

2016-08-16 Thread Robson Ramos Barreto
Hello Guys

I thought that project very interesting.

I'm looking for openshift integration too.

Thank you


2016-08-16 10:59 GMT-03:00 v :

> Hello Jonathan,
>
> thank you for you input, it is highly valued.
>
> I have to admit that I did not know of Atomic Registry - looks like a very
> promising project. I am looking forward to seeing Atomic Registry being
> integrated into OpenShift. :)
>
> We're using one-registry-per-project because this allows us sell to
> customers things like "100 GiB of Registry Storage". Each project registry
> gets its own PersistentVolume via NFS and the NFS storage consists of a
> thinly provisioned Logical Volume limited to 100 GiB at max.
>
> I haven't found out how to do something similar like that (i.e. selling
> 100 GiB of registry storage to a customer and making sure he can't use more
> than 100 GiB) using the integrated docker registry. Will check out whether
> this is possible with Atomic Registry.
>
> Regards
> v
>
>
>
> Am 2016-08-14 um 00:41 schrieb Jonathan Yu:
>
> Hi there,
>
> I'm not an expert regarding the registry by any means, but since nobody
> else has replied, I just wanted to share some thoughts.
>
> On Wed, Aug 3, 2016 at 5:59 AM, v  wrote:
>
>> Hello,
>>
>> we would like to deploy our first multi-tenant OpenShift Cluster and we'd
>> like to have all customers as separated as possible. For this reason we
>> would like to give each customer his/her own docker registry and registry
>> storage.
>>
>
> OpenShift is designed for multi-tenancy, including the networking stack
> (that's why we have OpenShift SDN) and the registry (the registry itself is
> shared, but our registry has integrated security for the multi-tenant use
> case).  It's worth noting that the code in OpenShift Origin eventually
> becomes the code that we run on our multi-tenant public cloud, OpenShift
> Online.
>
> There is some ongoing work to integrate our Atomic Registry into OpenShift
> as this would provide better management capabilities:
> https://trello.com/c/0hsX6B4G/210-enterprise-image-registry-
> atomic-registry
>
> That said, configuring individual registries would indeed give the best
> isolation, though at the cost of (potentially significant) administrative
> overhead, as you will need to monitor/manage many registries instead of
> just one.  On the other hand, the advantage is that downtime of the
> registry would only affect individual tenants, so it really depends on your
> use case.
>
>
>> We thought we'd create a registry-pod in every project. Should we just
>> use the official docker registry image from the docker hub or should we use
>> openshift/origin-docker-registry?
>>
>
> I'm biased, since I work for Red Hat, but I'd suggest trying the Atomic
> Registry as it comes with sophisticated security controls and a management
> interface.  Just a personal preference - I like graphical interfaces versus
> doing stuff on the command line.
>
> If you do go the route of having individual registries for each project,
> you'll need to tell projects where to push images:
> https://docs.openshift.org/latest/dev_guide/builds.html#build-output
>
> I think this also means that our built-in tools for managing registries
> will be unusable: https://docs.openshift.org/
> latest/admin_guide/monitoring_images.html
>
>
>> What is the "best practice" concerning the handling of docker registries
>> in multi-tenant clusters?
>>
>
> I'd suggest just sticking to what we ship (a multi-tenant-aware registry)
> and using that, as it's well-tested and fairly flexible:
> https://docs.openshift.org/latest/install_config/install/
> docker_registry.html#advanced-overriding-the-registry-configuration
>
> --
> Jonathan Yu, P.Eng. / Software Engineer, OpenShift by Red Hat / Twitter
> (@jawnsy) is the quickest way to my heart 
>
> *“A master in the art of living draws no sharp distinction between his
> work and his play; his labor and his leisure; his mind and his body; his
> education and his recreation. He hardly knows which is which. He simply
> pursues his vision of excellence through whatever he is doing, and leaves
> others to determine whether he is working or playing. To himself, he always
> appears to be doing both.”* — L. P. Jacks, Education through Recreation
> (1932), p. 1
>
>
> ___
> users mailing 
> listusers@lists.openshift.redhat.comhttp://lists.openshift.redhat.com/openshiftmm/listinfo/users
>
>
>
> ___
> users mailing list
> users@lists.openshift.redhat.com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>
>
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: Disable self-provisioning

2016-07-27 Thread Robson Ramos Barreto
Hello Jordan

It  worked

Thank you


2016-07-26 16:48 GMT-03:00 Jordan Liggitt <jligg...@redhat.com>:

> To delete that cluster role binding:
> oc delete clusterrolebinding self-provisioners
>
>
> To just remove that role from the authenticated groups of users:
> oadm policy remove-cluster-role-from-group self-provisioner
> system:authenticated system:authenticated:oauth
>
>
>
>
>
> On Tue, Jul 26, 2016 at 3:43 PM, Robson Ramos Barreto <
> robson.rbarr...@gmail.com> wrote:
>
>> Hello Guys,
>>
>> How can I disable self-provisioning role to any users so that they can't
>> create new projects on the OpenShift Enterprise ?
>>
>> Taking a look at documentation [1] it says to delete self-provisioners
>> cluster role binding but I don't understand how I can do that
>>
>> [1]
>> https://docs.openshift.com/enterprise/3.2/admin_guide/managing_projects.html
>>
>> Thank you
>>
>> Regards
>>
>> Robson
>>
>> ___
>> users mailing list
>> users@lists.openshift.redhat.com
>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>
>>
>
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Disable self-provisioning

2016-07-26 Thread Robson Ramos Barreto
Hello Guys,

How can I disable self-provisioning role to any users so that they can't
create new projects on the OpenShift Enterprise ?

Taking a look at documentation [1] it says to delete self-provisioners
cluster role binding but I don't understand how I can do that

[1]
https://docs.openshift.com/enterprise/3.2/admin_guide/managing_projects.html

Thank you

Regards

Robson
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: Deploy wordpress with persistent volume

2016-07-14 Thread Robson Ramos Barreto
2016-07-14 19:03 GMT-03:00 Ben Parees <bpar...@redhat.com>:

>
>
> On Thu, Jul 14, 2016 at 4:40 PM, Robson Ramos Barreto <
> robson.rbarr...@gmail.com> wrote:
>
>>
>>
>> 2016-07-11 12:13 GMT-03:00 Ben Parees <bpar...@redhat.com>:
>>
>>>
>>>
>>> On Mon, Jul 11, 2016 at 10:28 AM, Robson Ramos Barreto <
>>> robson.rbarr...@gmail.com> wrote:
>>>
>>>>
>>>>
>>>> 2016-07-11 11:16 GMT-03:00 Ben Parees <bpar...@redhat.com>:
>>>>
>>>>>
>>>>>
>>>>> On Mon, Jul 11, 2016 at 10:13 AM, Robson Ramos Barreto <
>>>>> robson.rbarr...@gmail.com> wrote:
>>>>>
>>>>>>
>>>>>> 2016-07-08 16:45 GMT-03:00 Ben Parees <bpar...@redhat.com>:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Jul 8, 2016 at 3:33 PM, Robson Ramos Barreto <
>>>>>>> robson.rbarr...@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hello Ben
>>>>>>>>
>>>>>>>> Thank you for your time
>>>>>>>>
>>>>>>>> I'm using this one:
>>>>>>>> https://github.com/rrbarreto/ose-wordpress/blob/master/wordpress-template.json
>>>>>>>>
>>>>>>>> I see. So the files are being replaced when the PV is mounted
>>>>>>>> because the image with the contents are created before, right ?
>>>>>>>>
>>>>>>>
>>>>>>> ​right
>>>>>>> ​
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>> > Your goal should be to have an image that is immutable w/ respect
>>>>>>>> to application logic.
>>>>>>>> I'm newbie with openshift / docker so I'd appreciate very much if
>>>>>>>> you could give me any example from how I can do that
>>>>>>>>
>>>>>>>
>>>>>>> ​well that template creates an image that is immutable w/ respect to
>>>>>>> application logic..  the template is defining a buildconfig which 
>>>>>>> produces
>>>>>>> a wordpress image that includes the wordpress code as part of the image.
>>>>>>>
>>>>>> That's it. The template is creating the image with the wordpress code
>>>>>> only to ephemeral volume. When I attach a persistent volume (as you can 
>>>>>> see
>>>>>> in the template) the worpress code isn't being built in the image.
>>>>>>
>>>>>> My goal is deploy wordpress application with persistent volume and
>>>>>> make autoscaling.
>>>>>>
>>>>>
>>>>> If you want the actual code to live on a PV so that it is shared
>>>>> between instances when you scale up, you will need to create your own
>>>>> wordpress image in which the code is built into the image, but during
>>>>> startup, the image copies its code into the PV location and then launches
>>>>> wordpress using the PV code.
>>>>>
>>>>
>>>> How could I to do this ?
>>>>
>>>
>>> ​we do something similar in our jenkins image, the config is baked into
>>> the image and then copied to the PV mount path during startup so the config
>>> can be modified by the user and persisted, you can look to this example:
>>>
>>>
>>> https://github.com/openshift/jenkins/blob/master/1/contrib/s2i/run#L37-L65
>>>
>>>
>> Hello Ben,
>>
>> I understood that the BuildConfig section you can't define persistent due
>> it create a temporary container to inject the data into the image.
>>
>> So due this we must create the custom image with the data as you guided me
>>
>> What image strategy to create custom image would you recommend ?
>> s2i or Docker ?
>>
>
> ​It's really up to you.  If you're comfortable with Dockerfiles (and don't
> intend to build this image on openshift online, which doesn't allow docker
> builds), you can do that.
>
> Otherwise you might be better off forking our existing php s2i builder
> image and modifying the assemble and run scripts it includes to do what I
> described with the code:
> https://github.com/sclorg/s2i-php-container

Re: Deploy wordpress with persistent volume

2016-07-11 Thread Robson Ramos Barreto
2016-07-11 11:16 GMT-03:00 Ben Parees <bpar...@redhat.com>:

>
>
> On Mon, Jul 11, 2016 at 10:13 AM, Robson Ramos Barreto <
> robson.rbarr...@gmail.com> wrote:
>
>>
>> 2016-07-08 16:45 GMT-03:00 Ben Parees <bpar...@redhat.com>:
>>
>>>
>>>
>>> On Fri, Jul 8, 2016 at 3:33 PM, Robson Ramos Barreto <
>>> robson.rbarr...@gmail.com> wrote:
>>>
>>>> Hello Ben
>>>>
>>>> Thank you for your time
>>>>
>>>> I'm using this one:
>>>> https://github.com/rrbarreto/ose-wordpress/blob/master/wordpress-template.json
>>>>
>>>> I see. So the files are being replaced when the PV is mounted because
>>>> the image with the contents are created before, right ?
>>>>
>>>
>>> ​right
>>> ​
>>>
>>>
>>>>
>>>> > Your goal should be to have an image that is immutable w/ respect to
>>>> application logic.
>>>> I'm newbie with openshift / docker so I'd appreciate very much if you
>>>> could give me any example from how I can do that
>>>>
>>>
>>> ​well that template creates an image that is immutable w/ respect to
>>> application logic..  the template is defining a buildconfig which produces
>>> a wordpress image that includes the wordpress code as part of the image.
>>>
>> That's it. The template is creating the image with the wordpress code
>> only to ephemeral volume. When I attach a persistent volume (as you can see
>> in the template) the worpress code isn't being built in the image.
>>
>> My goal is deploy wordpress application with persistent volume and make
>> autoscaling.
>>
>
> If you want the actual code to live on a PV so that it is shared between
> instances when you scale up, you will need to create your own wordpress
> image in which the code is built into the image, but during startup, the
> image copies its code into the PV location and then launches wordpress
> using the PV code.
>

How could I to do this ?

> ​
>
>
>
>>
>>
>>> If you are interested in changing the wordpress code that's included in
>>> the image, you should change what the buildconfig is building by changing
>>> the code in the repository referenced here:
>>>
>>> https://github.com/rrbarreto/ose-wordpress/blob/master/wordpress-template.json#L75
>>>
>>> That parameter is defined here with a default value:
>>>
>>> https://github.com/rrbarreto/ose-wordpress/blob/master/wordpress-template.json#L378
>>>
>>> obviously you can't change the
>>> https://github.com/wordpress/wordpress.git repository, so you'd want to:
>>> 1) fork the wordpress repo
>>> 2) make your changes in your fork
>>> 3) update the template to change the default parameter value to point to
>>> your fork, or at least when instantiating the template, explicitly set the
>>> parameter value to point to your fork instead of accepting the default
>>> parameter value.
>>>
>>>
>>> ​
>>>
>>>
>>>
>>>>
>>>> Thank you
>>>>
>>>> Regards
>>>>
>>>> Robson
>>>>
>>>> 2016-07-08 13:18 GMT-03:00 Ben Parees <bpar...@redhat.com>:
>>>>
>>>>> Not sure which wordpress image/example you're using since there are
>>>>> two in there, but if you started from this one:
>>>>> https://github.com/openshift/origin/blob/master/examples/wordpress/template/wordpress-mysql.json,
>>>>> then the wordpress source lives in /opt/app-root/src within the image and
>>>>> since you're mounting a PV to that path, you're replacing the
>>>>> /opt/app-root/src image content with the contents of your PV.
>>>>>
>>>>> Fundamentally that wordpress image isn't designed to have
>>>>> /opt/app-root/src be a volume.
>>>>>
>>>>> If you want the source code to be on a PV so you can safely edit it
>>>>> and have your changes persisted, you need an image that's going to, on
>>>>> startup, copy its source from a location within the image, to a location
>>>>> that you're mounting the PV at, and then run the source from that PV
>>>>> directory.
>>>>>
>>>>> But in general that would not be a recommended pattern.  Your goal
>>>>> should be to have an image that is immutable w/ respect to application

Re: Deploy wordpress with persistent volume

2016-07-08 Thread Robson Ramos Barreto
Hello Ben

Thank you for your time

I'm using this one:
https://github.com/rrbarreto/ose-wordpress/blob/master/wordpress-template.json

I see. So the files are being replaced when the PV is mounted because the
image with the contents are created before, right ?

> Your goal should be to have an image that is immutable w/ respect to
application logic.
I'm newbie with openshift / docker so I'd appreciate very much if you could
give me any example from how I can do that

Thank you

Regards

Robson

2016-07-08 13:18 GMT-03:00 Ben Parees <bpar...@redhat.com>:

> Not sure which wordpress image/example you're using since there are two in
> there, but if you started from this one:
> https://github.com/openshift/origin/blob/master/examples/wordpress/template/wordpress-mysql.json,
> then the wordpress source lives in /opt/app-root/src within the image and
> since you're mounting a PV to that path, you're replacing the
> /opt/app-root/src image content with the contents of your PV.
>
> Fundamentally that wordpress image isn't designed to have
> /opt/app-root/src be a volume.
>
> If you want the source code to be on a PV so you can safely edit it and
> have your changes persisted, you need an image that's going to, on startup,
> copy its source from a location within the image, to a location that you're
> mounting the PV at, and then run the source from that PV directory.
>
> But in general that would not be a recommended pattern.  Your goal should
> be to have an image that is immutable w/ respect to application logic.
>
>
>
> On Fri, Jul 8, 2016 at 11:29 AM, Robson Ramos Barreto <
> robson.rbarr...@gmail.com> wrote:
>
>> Hello Guys,
>>
>> I'm trying to deploy wordpress with persistent volume on openshift
>> enterprise 3.2 (30 Day Self-Supported) as in the example [1] but the git
>> files aren't being wirtten in the NFS path. MySQL is being deployed
>> properly in the NFS persistent volume
>>
>> # ls -ld /exports/wordpress/mysql/
>> drwxrwxrwx. 5 nfsnobody nfsnobody 4096 Jul  8 10:35
>> /exports/wordpress/mysql/
>>
>> # ls -lr /exports/wordpress/mysql/
>> total 88084
>> drwx--. 2 27 27   19 Jul  8 09:48 wordpress
>> drwx--. 2 27 27 4096 Jul  8 09:48 performance_schema
>> -rw-rw. 1 27 272 Jul  8 10:35 mysql-1-ijptl.pid
>> -rw-rw. 1 27 272 Jul  8 09:48 mysql-1-1soui.pid
>> drwx--. 2 27 27 4096 Jul  8 09:48 mysql
>> -rw-rw. 1 27 27 38797312 Jul  8 09:48 ib_logfile1
>> -rw-rw. 1 27 27 38797312 Jul  8 10:35 ib_logfile0
>> -rw-rw. 1 27 27 12582912 Jul  8 10:35 ibdata1
>> -rw-rw. 1 27 27   56 Jul  8 09:48 auto.cnf
>>
>> # ls -ld /exports/wordpress/wp/
>> drwxrwxrwx. 2 nfsnobody nfsnobody 26 Jul  7 18:43 /exports/wordpress/wp/
>>
>> # ls -lr /exports/wordpress/wp/
>> total 0
>>
>> $ oc get pods
>> NAME  READY STATUS  RESTARTS   AGE
>> mysql-1-ijptl 1/1   Running 0  44m
>> wordpress-mysql-example-1-1clom   1/1   Running 0  41m
>> wordpress-mysql-example-1-build   0/1   Completed   0  44m
>>
>> $ oc rsh wordpress-mysql-example-1-1clom
>> sh-4.2$ pwd
>> /opt/app-root/src
>> sh-4.2$ df -h /opt/app-root/src
>> Filesystem Size  Used Avail Use% Mounted on
>> 192.168.0.9:/exports/wordpress/wp   50G   11G   40G  22%
>> /opt/app-root/src
>> sh-4.2$ ls
>> sh-4.2$ echo "Create file from pod" > teste.txt
>>
>> # ls -lr /exports/wordpress/wp/
>> total 4
>> -rw-r--r--. 1 1001 nfsnobody 21 Jul  8 11:21 teste.txt
>>
>> # cat /exports/wordpress/wp/teste.txt
>> Create file from pod
>>
>> $ oc get pvc
>> NAME  STATUSVOLUME  CAPACITY   ACCESSMODES   AGE
>> claim-mysql   Bound nfs-pv007   5GiRWO   19h
>> claim-wp  Bound nfs-pv008   2GiRWO,RWX   19h
>>
>> $ oc volumes dc --all
>> deploymentconfigs/mysql
>>   pvc/claim-mysql (allocated 5GiB) as mysql-data
>> mounted at /var/lib/mysql/data
>> deploymentconfigs/wordpress-mysql-example
>>   pvc/claim-wp (allocated 2GiB) as wordpress-mysql-example-data
>> mounted at /opt/app-root/src
>>
>> Template
>>
>> 172   spec:
>> {¬
>> 173 volumes:
>> [¬
>> 174
>> {¬
>> 175 name:
>> ${APP_NAME}-data,¬
>> 176 persistentVolumeClaim:
>> {¬
>> 177   claimName:
>> ${CLAIM_WP_NAME}¬
>> 178
>> }¬
>> 179
>> }¬
>

Deploy wordpress with persistent volume

2016-07-08 Thread Robson Ramos Barreto
Hello Guys,

I'm trying to deploy wordpress with persistent volume on openshift
enterprise 3.2 (30 Day Self-Supported) as in the example [1] but the git
files aren't being wirtten in the NFS path. MySQL is being deployed
properly in the NFS persistent volume

# ls -ld /exports/wordpress/mysql/
drwxrwxrwx. 5 nfsnobody nfsnobody 4096 Jul  8 10:35
/exports/wordpress/mysql/

# ls -lr /exports/wordpress/mysql/
total 88084
drwx--. 2 27 27   19 Jul  8 09:48 wordpress
drwx--. 2 27 27 4096 Jul  8 09:48 performance_schema
-rw-rw. 1 27 272 Jul  8 10:35 mysql-1-ijptl.pid
-rw-rw. 1 27 272 Jul  8 09:48 mysql-1-1soui.pid
drwx--. 2 27 27 4096 Jul  8 09:48 mysql
-rw-rw. 1 27 27 38797312 Jul  8 09:48 ib_logfile1
-rw-rw. 1 27 27 38797312 Jul  8 10:35 ib_logfile0
-rw-rw. 1 27 27 12582912 Jul  8 10:35 ibdata1
-rw-rw. 1 27 27   56 Jul  8 09:48 auto.cnf

# ls -ld /exports/wordpress/wp/
drwxrwxrwx. 2 nfsnobody nfsnobody 26 Jul  7 18:43 /exports/wordpress/wp/

# ls -lr /exports/wordpress/wp/
total 0

$ oc get pods
NAME  READY STATUS  RESTARTS   AGE
mysql-1-ijptl 1/1   Running 0  44m
wordpress-mysql-example-1-1clom   1/1   Running 0  41m
wordpress-mysql-example-1-build   0/1   Completed   0  44m

$ oc rsh wordpress-mysql-example-1-1clom
sh-4.2$ pwd
/opt/app-root/src
sh-4.2$ df -h /opt/app-root/src
Filesystem Size  Used Avail Use% Mounted on
192.168.0.9:/exports/wordpress/wp   50G   11G   40G  22% /opt/app-root/src
sh-4.2$ ls
sh-4.2$ echo "Create file from pod" > teste.txt

# ls -lr /exports/wordpress/wp/
total 4
-rw-r--r--. 1 1001 nfsnobody 21 Jul  8 11:21 teste.txt

# cat /exports/wordpress/wp/teste.txt
Create file from pod

$ oc get pvc
NAME  STATUSVOLUME  CAPACITY   ACCESSMODES   AGE
claim-mysql   Bound nfs-pv007   5GiRWO   19h
claim-wp  Bound nfs-pv008   2GiRWO,RWX   19h

$ oc volumes dc --all
deploymentconfigs/mysql
  pvc/claim-mysql (allocated 5GiB) as mysql-data
mounted at /var/lib/mysql/data
deploymentconfigs/wordpress-mysql-example
  pvc/claim-wp (allocated 2GiB) as wordpress-mysql-example-data
mounted at /opt/app-root/src

Template

172   spec:
{¬
173 volumes:
[¬
174
{¬
175 name:
${APP_NAME}-data,¬
176 persistentVolumeClaim:
{¬
177   claimName:
${CLAIM_WP_NAME}¬
178
}¬
179
}¬
180
],¬
181 containers:
[¬
182
{¬
183 name:
${APP_NAME},¬
184 image:
${APP_NAME},¬
185 ports:
[¬
186
{¬
187 containerPort:
8080,¬
188 name:
wp-server¬
189
}¬
190
],¬
191 volumeMounts:
[¬
192
{¬
193 name:
${APP_NAME}-data,¬
194 mountPath:
${WP_PATH}¬
195
}¬
196 ],¬


Any help will very appreciate

Thank you

[1] https://github.com/openshift/origin/tree/master/examples/wordpress/

Regards

Robson
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users