TAGS

There are no tags associated with this article.

How to publish geoTIFF as a WMS with use of GeoServer on OSGeoLive

1.  Create an instance with the OSGeoLive image

The process of creating an OSGeoLive instance is the same as the basic one, but in the Source tab select the OSGeoLive image.

If you need help creating a new instance, you can follow the guide below:

https://creodias.eu/-/a-9-16

Access to the OSGeoLive instance via the console is non-standard and is presented in the guide in point 2.

1.1 Assign a Floating IP to the newly created instance.

If you need help assigning a Floating IP address to your instance, you can follow the guide below:

https://creodias.eu/-/a-2

1.2 Create a new Security Group that will have a rule for GeoServer.

GeoServer requires to create a rule for port 8082.

To do this, create a new Security Group that will have this rule.

Then click on the "Manage Rules" action button to add a new rule.

The new rule should have the following fields:

Remember to assign the newly created Security Group to the instance.

If you need help creating/using a new Security Group, you can follow the guide below:

https://creodias.eu/-/how-to-use-security-groups-in-horizon-

2. Access the OSGeoLive instance

To access the GUI of the OSGeoLive instance, please follow the guide below:

https://creodias.eu/-/how-to-get-access-to-gui-on-vm-with-osgeolive-image-

3. GeoServer startup

After accessing the instance, select LXTerminal from the application menu (System Tools → LXTerminal).

Enter the command:

sudo adduser eouser users

Then close the x2go session and reboot the instance from the OpenStack Horizon panel.

After reconnecting to the instance via x2go start the GeoServer.

To do this, in the application menu, go to Geospatial → Web Services → GeoServer → Start GeoServer.

When the "Starting web browser" message appears, press the OK button.

After pressing the button you will be redirected to the address:

http://localhost:8082/geoserver/web/

in your browser on the instance.

There are login fields in the top right corner of the welcome page.

To log in, use the default login details:

username: admin

password: geoserver

And then click on the Login button.

For security reasons, we recommend change the password after logging in.

In the left menu in the Security section, select Users, Groups, Roles.

Then select the Users/Groups tab.

Select the admin user.

Enter new passwords for the admin user, and then save the new password by pressing the Save button in the bottom section of the page.

4. Publish geoTIFF

To public data, go to the Data section, and then select Stores.

Then select Add new store.

From the Raster Data Sources section, select GeoTIFF.


Then on the form in the Data Source Name field enter the name of the data.
In the URL field, browse the path to the file you want to publish, and then click on the Save button.

Then, in the Action column, click on Publish.

You will be redirected to a panel where you can edit the layer. If the layer does not require editing or you want to save the changes, click the Save button at the bottom of the page.

Then select Layer Preview from the Data section in left menu. Use the search box to search for published data.

In the Common Formats column, you can select OpenLayers so you can get a quick preview.

In the All Formats column, you can select formats with which you can download data e.g. jpg, png, gif.

By copying the generated link and replacing localhost with the floating ip address of the OSGeoLive instance, you can access the data outside the instance.


VM created with option "Create New Volume" - Yes

While creating a new Virtual Machine, you have to choose the source from which the VM will be built.

If you choose "Image", you can choose the option "Create New Volume": Yes or No

By default the option "No" is chosen

Option: Create New Volume - Yes

This option allows you to choose the system volume different from that defined in the flavor

Now you can choose the Volume Size

In the example below we will choose the volume 15 GB and apply it to the flavor eo1.xsmall

Default size of the system disk for flavor eo1.xsmall is 8 GB

After choosing the other parameters (Details, Flavor, Networks, Security Group and Key Pair) you can launch the instance

You can see the VM created

If you go to Volumes -> Volumes pane you can see the system volume which the new VM is built on

If you click on "Edit Volume" button, you will see that the volume is bootable

If you previously have chosen "Delete Volume on Instance Delete": No

and now you will delete the VM:

then the volume will remain (not attached to any instance)

You can now create a new VM from the volume choosing "Launch as Instance"

you can choose choose different new flavor (eg. eo1.xmedium) than original  (eo1.xsmall)

After choosing other parameters (Details, Networks, Security Group and Key Pair) you can launch the instance.


VM created with option "Create New Volume" - No

If you choose "Image", you can choose the option "Create New Volume": Yes or No

By default the option "No" is chosen

the new Virtual Machine will be created with System Volume (Root Disk) defined in the flavor.

If you want to choose different size of the System Volume (Root Disk) - check the article "VM creation - option Create New Volume - Yes"

In contrast to VM created with option "Create New Volume - Yes" https://creodias.eu/-/vm-creation-option-create-new-volume-yes, the system disk is "ephemeral" - it is not visible in Volumes pane 


How to create new Linux VM in OpenStack dashboard (Horizon)?

Go to Project → Compute → Instances.

Click "Launch Instance".

Insert the name of the Instance (eg. "vm01") and click Next button.

Select Instance Boot Source (eg. "Image"), and choose desired image (eg. "Ubuntu 16.04 LTS") by clicking on arrow.
We reccomend setting "Create New Volume" feature to "No" state.

Choose Flavour (eg. eo1.xsmall).

Click "Networks" and then choose desired networks.

Open "Security Groups" After that, choose "allow_ping_ssh_rdp" and "default".

Choose or generate SSH keypair for your VM. Next, launch your instance by clicking on blue button.

You will see "Instances" menu with your newly created VM. Open the drop-down menu and choose "Console".

Click on the black terminal area (to activate access to the console). Type: eoconsole and hit Enter.

Insert and retype new password.

Now you can type commands. After you finish, type "exit".

This will close the session.

If you want to make your VM accessible from the Internet check here.


How to get access to GUI on VM with OSGeoLive image?

You can get access to your GUI in two ways.

 

1. Using SPICE console in Horizon panel

Login to https://cf2.cloudferro.com and go to Project → Compute → Instances and select the VM you are interested in.

Open Action menu and choose "Console".

Default user for OSGeoLive image is "eouser" (EO User). Select the password field and press enter twice.

Then set a new password.

After logging in you will gain access to the GUI.

 

2. Using program for remote control

To access the GUI you can use a remote access program such as x2go.

You can read more about how to use GUI in VM with Linux here.

 

In the current OSGeoLive image the x2go server is already installed so all you have to do is install the x2go client on your side.

sudo apt-get install x2goclient

Run x2go by command:

x2goclient

then chose form top menu Session → New session ...

Complete the field with the necessary data:

  • Host - floating IP of the virtual machine,
  • Login - eouser (account allowed for ssh connection),
  • SSH port - 22 (by default),
  • Use RSA/DSA key for ssh connection - put your ssh private key,
  • Session type - chose Custom desktop
    and type in Command field: /usr/bin/lxsession -s Lubuntu -e LXDE

Go to Input/Output tab and Display if you want to change dispaly mode.

Click "OK", if all fields have been typed correctly you should see a tile with information about the newly created session.

Click on the tile.

After starting the session, you will gain visible acces to your virtual machine.