Deploy to different environments

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Deploy to different environments

RameshBhat
Hi,

I am trying to publish forms my local machine to my staging machine.

Following are the steps I have tried:

Added the following in local server (properties-local.xml)

<property as="xs:string" name="oxf.fr.home.remote-servers">
  [
    {
      "label": "Staging",
      "url":   "http://staging.example.org:8080/orbeon"
    },
    {
      "label": "Production",
      "url":   "http://prod.example.org:9090/orbeon"
    }
  ]
</property>


On the remote server , when we extract the orbeon-auth.war , do we have to replace the web.xml since there is already a web.xml from orbeon.war.

On the remote server , have added an entry in properties.xml file as below:

<property
  as="xs:anyURI"
  processor-name="oxf:page-flow"
  name="authorizer"
  value="/orbeon-auth"/>

On the remote server : modified the tomcat-users as below:
<role rolename="orbeon-service"/>
<user username="orbeon" password="orbeon" roles="orbeon-service"/>


Also do we need to configure orbeon-service as a local service on the machine.
Regards
Reply | Threaded
Open this post in threaded view
|

Re: Deploy to different environments

Alessandro  Vernet
Administrator
Hi Ramesh,

The orbeon-auth.war is deployed as a separate web app, at the same level as orbeon.war, e.g.:

- orbeon-auth.war deployed on /orbeon-auth
- orbeon.war deployed on /orbeon

So you won't be "merging" the web.xml of orbeon.war and orbeon-auth.war.

And on the local server, you don't have any setup for the `orbeon-service` role. Instead, from the Form Runner home page, when publishing a form to a remote server, you log into that server using a user that has this role, which in your case would be orbeon/orbeon. Does this make sense?

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Deploy to different environments

RameshBhat
Hi,

I have tried this approach as well. Placed the orbeon-auth.war at the same root level of Orbeon.

Configured the properties.xml to point to two different environments.

When I try to navigate to the /orbeon/fr services page it asks for a UserName/Password combination. As I key in the credentials the pop up just refreshes in the UI and no re-direction happens (Either to a non authorized page or to a authorized page).

The user name and password are configured in tomcat-users.xml for the orbeon-service role.

I do not see any erros or authorization issues in the log files either.

Regards
Reply | Threaded
Open this post in threaded view
|

Re: Deploy to different environments

Alessandro  Vernet
Administrator
To make sure I understand this properly, could you share with us a screenshot of the place where you enter login/password when going to /orbeon/fr/?

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Deploy to different environments

RameshBhat
Hi,

Kindly find attached, I get the following pop up (attached)DeployIssue.png.

FormRunner.png

As I key in the user name and password for the different environments the pop up remains on the screen.

The user name and password are configured in tomcat-users.xml as below:

<role rolename="orbeon-service"/>
<user username="orbeon" password="test" roles="orbeon-service"/>
</tomcat-users>


When I click on cancel, I am able to
Reply | Threaded
Open this post in threaded view
|

Re: Deploy to different environments

Alessandro  Vernet
Administrator
Hi Ramesh,

Got it, thank you for the screenshot. So when you enter the username/password and hit Connect, you don't get any error message? The dialog just stays where it is, as if you hadn't clicked on the Connect button?

Also, could you attach to your response the orbeon.log just after you clicked on the Connect button?

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Deploy to different environments

RameshBhat
Hi,

Kindly find attached the Orbeon Log:

orbeon.log
Reply | Threaded
Open this post in threaded view
|

Re: Deploy to different environments

Alessandro  Vernet
Administrator
Hi Ramesh,

From the log, it looks like Orbeon Forms tries to connect to another instance of Orbeon Forms at http://localhost:8080/orbeon/home/fr/service/persistence/form, but gets a 404. I am surprised by the "localhost" in the URL, as typically "remote servers" aren't on localhost. Or is this intentional?

If this isn't what you expected, I would check that your `oxf.fr.home.remote-servers` is properly set. For more on this, see:

https://doc.orbeon.com/form-runner/feature/home-page.html#configuration-on-the-local-server

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Deploy to different environments

RameshBhat
Hi,

What I have set up for Test is a staging server pointing to my local environment, and a production environment pointing to my colleagues machine.


The issue is when I key in the user name and password, why does not the pop up window either redirect to a Authorised page or to a not authorized page.

What I am trying to achieve is select a form to be published to a different machine.  The other machine (one used for production) is accessible through the Local IP and able to telnet the same

<property as="xs:string" name="oxf.fr.home.remote-servers">
  [
    {
      "label": "Staging",
      "url":   "http://localhost:8080/orbeon/home/"
    },
    {
      "label": "Production",
      "url":   "http://xx.xx.xx.xx:8080/orbeon/home/"
    }
  ]
</property>

Regards
Reply | Threaded
Open this post in threaded view
|

Re: Deploy to different environments

Alessandro  Vernet
Administrator
Hi Ramesh,

It seems that error situations, in particular a 404, aren't necessarily all handled in an optimal way. We will looking in this. Also note that the URL you put in `oxf.fr.home.remote-servers` should point to the "root" of the Orbeon Forms web app, i.e. in your case they should just be:

- http://localhost:8080/orbeon
- http://xx.xx.xx.xx:8080/orbeon

With those properly set, do you manage to get remote operations working?

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Deploy to different environments

Alessandro  Vernet
Administrator
Hi Ramesh,

Just a quick note to mention that I created an issue to improve user's feedback in case a 404 is encountered when trying to connect to the remote server.

https://github.com/orbeon/orbeon-forms/issues/3162

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet