Skip to content
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

Programmatic import on AWS? #47

Closed
iboates opened this issue Jun 29, 2018 · 14 comments
Closed

Programmatic import on AWS? #47

iboates opened this issue Jun 29, 2018 · 14 comments
Labels

Comments

@iboates
Copy link

iboates commented Jun 29, 2018

Is there a way to run a database import via command line arguments or some other programmatic method? I would like to deploy an xml file to a cloud server & DB along with the importer/exporter tool and then have the import happen there rather than tie up my own machine.

@FxKu FxKu added the question label Jul 2, 2018
@FxKu
Copy link
Member

FxKu commented Jul 2, 2018

Yes, the Importer/Exporter also provides a command line interface. You can find a description in the 3DCityDB manual starting from page 202 - chapter 5.8.

@iboates
Copy link
Author

iboates commented Jul 5, 2018

Thanks for the info. I was able to get it working. I do have one further question, though: Is it also possible to do the installation itself from the command line? I am unable to simply run java -jar 3DCityDB-Importer-Exporter-3.3.2-Setup.jar because it will attempt to launch a GUI, which throws an error because the AWS virtual machine has no graphical display, only a command line. The way I gotit working was to install it locally and then just copy the entire program into the AWS virtual machine.

I intend to document the procedure of setting this whole system up in the AWS architecture, would your group be interested in that, maybe even adding it as an addendum to the documentation? I would like to contribute to the project.

@clausnagel
Copy link
Member

Well, we are using IzPack 4 for creating the installer. IzPack supports different ways for non-GUI installations. Check out the chapters Unattended installations and Console installations to learn how it works here: https://izpack.atlassian.net/wiki/spaces/IZPACK/pages/491532/Advanced+Features

Another possibility is to install the importer/exporter once using the GUI, and to zip the installation directory afterwards. Then you can unzip this archive at different locations using the console.

Also take a look the 3DCityDB docker images at: https://github.com/tum-gis/3dcitydb-docker-postgis

Yes, we very much welcome contribution to the 3DCityDB project. So please feel encouraged to do so. Adding another addendum to the documentation would definitely be one option.

@FxKu FxKu changed the title Programmatic import? Programmatic import on AWS? Aug 10, 2018
@clausnagel
Copy link
Member

Closing due to inactivity. Feel free to re-open if you need further assistance.

@HuyQuoc
Copy link

HuyQuoc commented Nov 21, 2018

Closing due to inactivity. Feel free to re-open if you need further assistance.

Hi, What is supported version of Ubuntu for installing without GUI ? Is this support 16.xx ?

Regards.

@clausnagel
Copy link
Member

clausnagel commented Nov 21, 2018

Actually, the Importer/Exporter only requires a JDK 8 (or higher) to be properly set up on the machine. There is no dependency on specific versions of Ubuntu. Are you facing issues on Ubuntu 16.x?

@HuyQuoc
Copy link

HuyQuoc commented Nov 21, 2018

Actually, the Importer/Exporter only requires a JDK 8 (or higher) to be properly set up on the machine. There is no dependency on specific versions of Ubuntu. Are you facing issues on Ubuntu 16.x?

I'm trying to do in Ubuntu 16.x but it's no longer support on servers. So i cannot update components to install Importer/Exporter.

@clausnagel
Copy link
Member

But Java 8 should be availble for Ubuntu 16?! Or use Java 11 which only requires unzipping to your machine. If this does not work, you should contact the Ubuntu support.

@HuyQuoc
Copy link

HuyQuoc commented Nov 21, 2018

But Java 8 should be availble for Ubuntu 16?! Or use Java 11 which only requires unzipping to your machine. If this does not work, you should contact the Ubuntu support.

Hi, I installed Ubuntu 16.10, so it's no longer support. I re-installed Ubuntu 16.04, but it still can not setup Importer/Exporter. It only return two folders (plugins and uninstaller) after run *.jar file, no more.

Here is my command: java -jar 3DCityDB-Importer-Exporter.jar -console.

@clausnagel
Copy link
Member

Maybe an issue with IzPack. I cannot test this currently.

The easiest way to overcome all these issues is to install the Importer/Exporter using the GUI on some machine with GUI support. Then zip or tar the installation directory and unzip on your Ubuntu machine.

@HuyQuoc
Copy link

HuyQuoc commented Nov 24, 2018

Maybe an issue with IzPack. I cannot test this currently.

The easiest way to overcome all these issues is to install the Importer/Exporter using the GUI on some machine with GUI support. Then zip or tar the installation directory and unzip on your Ubuntu machine.

Hi, I've installed Importer/Exporter with GUI and copy to No-GUI. After that. I installed Importer/Exporter follow https://www.3dcitydb.org/3dcitydb/fileadmin/downloaddata/3DCityDB_Documentation_v4.0.pdf and got errors:

`Please enter a valid SRID (e.g., EPSG code of the CRS to be used).
(SRID must be an integer greater than zero): 3068
CREATE_DB.sh: 51: CREATE_DB.sh: [[: not found

Please enter the EPSG code of the height system (use 0 if unknown or '3068' is already 3D).
(default HEIGHT_EPSG=0): 5783
CREATE_DB.sh: 66: CREATE_DB.sh: [[: not found

Please enter the corresponding gml:srsName to be used in GML exports.
(default GMLSRSNAME=urn:ogc:def:crs,crs:EPSG::3068,crs:EPSG::5783):

Connecting to "@:/" ...
Default footer is off.
SET
psql:CREATE_DB.sql:36: ERROR: function postgis_version() does not exist
LINE 1: SELECT postgis_version();
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.

CREATE_DB.sh: 92: read: Illegal option -s`

Note: I've created extension POSTGIS and POSTGIS_SFCGAL after creating new DATABASE and owner to SUPERUSER postgresql. Please help me to fix it.

Thanks.

@FxKu
Copy link
Member

FxKu commented Nov 24, 2018

Could you please open a new ticket in the 3dcitydb/3dcitydb repo as this seems to be more database realated. Btw the error messages tell me that postgis is not added to your chosen database. How do you run the setup? Thru the CREATE_DB shell script? Did you change the database name in the CONNECTION_DETAILS.SH file?

@HuyQuoc
Copy link

HuyQuoc commented Nov 24, 2018

Could you please open a new ticket in the 3dcitydb/3dcitydb repo as this seems to be more database realated. Btw the error messages tell me that postgis is not added to your chosen database. How do you run the setup? Thru the CREATE_DB shell script? Did you change the database name in the CONNECTION_DETAILS.SH file?

Yes, I've changed information in CONNECTION_DETAILS.SH. I tried many times but have same errors and I dont know reason.

Thanks.

@clausnagel
Copy link
Member

clausnagel commented Nov 26, 2018

I found the time to test the IzPack console installation, and was able to reproduce the issue reported by @HuyQuoc. The installation only creates the folders plugins (if selected to install) and uninstall. This is a bug in IzPack 4.3.5, which we use for building the Importer/Exporter 4.0 installer.

I fixed the bug (see 537510b). The console installation now works as expected. The fix will be included in the next release.

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

No branches or pull requests

4 participants