3cixty / hotel-api-integration

private, restricted repo for code that integrates with hotel APIs
0 stars 0 forks source link

Migration to beta.3cixty.com of mongodb and scripts #2

Open irmametra opened 8 years ago

irmametra commented 8 years ago

Issue regarding the migration of the booking.com hotel availability nightly check from the Polimi server to the HostEurope infrastructure

irmametra commented 8 years ago

Migration is complete. Installations in beta.3cixty.com

Added to crontab jobs: 00 1 * * * nodejs /home/irma/BookingScrapper/getRoomAvailability.js 10 1 * * * nodejs /home/irma/BookingScrapper/getHotelAvailability.js

New MongoDb Address: beta.3cixty.com Port: 27017

Script were tested and run today in the 3cixty machine.

@rtroncy can you let me know (via slack) when we can shut down the room availability retrieval in the machine planetlab2.elet.polimi.it?

rtroncy commented 8 years ago

@rtroncy can you let me know (via slack) when we can shut down the room availability retrieval in the machine planetlab2.elet.polimi.it?

Not quite yet :-) Thanks for having completed the first step. We need now to make sure that @jcballesteros is reading data from the new endpoint. I'm re-opening this issue.

@jcballesteros Can you please modify your [config.properties](https://github.com/3cixty/knowledgebase-software/blob/master/app/genHotelAvailability/config.properties to read from the new endpoint which is on beta? Is it just this configuration file to modify?

jcballesteros commented 8 years ago

The app genHotelAvailability is deprecated.

I added the functionality to the Collector.

I´m going to change the conf of the new endpoint.

jcballesteros commented 8 years ago

I just changed the configuration and I have an error: connect timed out

These are the lines that I changed:

//private static final String HOST = "planetlab2.elet.polimi.it";
//private static final int PORT = 37017;
private static final String HOST = "beta.3cixty.com";
private static final int PORT = 27017;

If I try to connect with "planetlab2.elet.polimi.it" the process works well.

@irmametra Something else has changed?

rtroncy commented 8 years ago

The app genHotelAvailability is deprecated.

In this case, could you please delete it from the repo if it is no longer used and deprecated?

I added the functionality to the Collector.

Can you document this in the README of the Collector?

If I try to connect with "planetlab2.elet.polimi.it" the process works well.

For now, but forget about this server since it will be shut down once we have verified that the migration is completed.

I suggest that @jcballesteros and @irmametra make a quick call to debug why http://beta.3cixty.com:27017 times out

jcballesteros commented 8 years ago
  1. App genHotelAvailability deleted
  2. I documented the booking extraction & transformation as an example
  3. I talked with @irmametra about the problem, and she is going to configure the MongoDB binding parameter to avoid this problem. Maybe the firewall configuration on Beta will give us problems.
irmametra commented 8 years ago

@jcballesteros : you should be able now to access mongodb. Can you please try? @rtroncy : access to booking is no longer available, so i removed the crontab jobs, so that the collections are not deleted.

rtroncy commented 8 years ago

Thanks @irmametra. I'm still following up with booking.

jcballesteros commented 8 years ago

@irmametra @rtroncy I just tried, and everything is going well