LogoLogo
  • Introduction
  • General platform architecture
    • Platform properties
    • Architecture introduction
    • Architecture functional layers
    • Architecture Principles
    • Platform components description
    • Message flow examples
    • Logical Authorisation Model
    • Non-functional overview
      • TimeBehavior
      • Internationalization and localization
      • Security
      • Scalability
      • Redundancy
      • Performance
    • Technical Overview
      • Web Services Layer
      • Domain Layer
      • Core Layer
      • Protocol Layer
      • Technology Stack
    • Use cases
    • Throttling
  • General User's Guide
    • Installation Guide
      • Installation
        • Vagrant
        • Manual Setup
      • GitHub configuration
      • Platform Setup
      • Test the Platform
        • Using SoapUi
        • Using the Demo App
    • Configuration
      • Add a device
      • Users
      • Add a new organisation
      • Throttling
    • Web Services
    • Deployment
    • FAQ
  • Open Source Community
    • Start contributing
    • Developers 101
    • Contributing to the code
    • Contributing to documentation
    • Communication and Contact
    • Governance
    • Code of Conduct
    • Foundation
  • Domains
    • Admin
    • Smart lighting
      • Use cases
      • Light Schedules
    • Tariff switching
    • Microgrids
    • Distribution automation
    • SmartMetering
      • Web Services
        • bypass retry
        • priority
        • scheduling
        • AdHocManagement
          • GetAssociationLnObjects
          • GetGetAssociationLnObjectsResponse
          • RetrieveConfigurationObjects
          • GetRetrieveConfigurationObjectsResponse
          • SpecificConfigurationObject
          • SynchronizeTime
          • GetSynchronizeTimeResponse
        • Bundle
          • Bundle
          • GetBundleResponse
        • Configuration
          • GetAdministrativeStatus
          • GetGetAdministrativeStatusResponse
          • GetFirmwareVersion
          • GetGetFirmwareVersionResponse
          • UpdateFirmware
          • GetUpdateFirmwareResponse
          • ReplaceKeys
          • GetReplaceKeysResponse
          • GetKeys
          • SetActivityCalendar
          • GetSetActivityCalendarResponse
          • SetAdministrativeStatus
          • GetSetAdministrativeStatusResponse
          • SetAlarmNotifications
          • GetSetAlarmNotificationsResponse
          • SetConfigurationObject
          • GetSetConfigurationObjectResponse
          • SetKeyOnGMeter
          • GetSetKeyOnGMeterResponse
          • SetPushSetupAlarm
          • GetSetPushSetupAlarmResponse
          • SetPushSetupSms
          • GetSetPushSetupSmsResponse
          • SetSpecialDays
          • GetSetSpecialDaysResponse
          • GetConfigurationObject
          • GetConfigurationObjectResponse
          • ConfigureDefinableLoadProfile
          • GetConfigureDefinableLoadProfileResponse
          • SetMbusUserKeyByChannel
          • GetSetMbusUserKeyByChannelResponse
          • GetMbusEncryptionKeyStatus
          • GetGetMbusEncryptionKeyStatusResponse
          • GetMbusEncryptionKeyStatusByChannel
          • GetGetMbusEncryptionKeyStatusByChannelResponse
          • ScanMbusChannels
          • ScanMbusChannelsResponse
        • Installation
          • AddDevice
          • GetAddDeviceResponse
          • CoupleMbusDevice
          • GetCoupleMbusDeviceResponse
          • DeCoupleMbusDevice
          • GetDeCoupleMbusDeviceResponse
        • Management
          • FindEvents
          • GetFindEventsResponse
          • GetDevices
          • SetDeviceLifecycleStatusByChannel
          • SetDeviceLifecycleStatusByChannelResponse
          • EnableDebugging
          • DisableDebugging
          • FindMessageLogs
          • GetGsmDiagnostic
        • Monitoring
          • GetActualMeterReads
          • GetActualMeterReadsResponse
          • GetActualMeterReadsGas
          • GetActualMeterReadsGasResponse
          • GetPeriodicMeterReads
          • GetPeriodicMeterReadsResponse
          • GetPeriodicMeterReadsGas
          • GetPeriodicMeterReadsGasResponse
          • GetProfileGenericData
          • GetProfileGenericDataResponse
          • ReadAlarmRegister
          • GetReadAlarmRegisterResponse
          • RetrievePushNotificationAlarm
        • Notification
          • SendNotification
      • ResponseMessages
      • Use cases
    • Guidelines to add a new domain to GXF
  • Protocols
    • IEC61850
      • SWDevice-010805
        • SWDevice-010805.icd
        • RegisterDevice
        • GetConfiguration
        • SetConfiguration
        • SetEventNotifications
        • EventNotification
        • SetSchedule
        • GetFirmwareVersion
        • UpdateFirmware
        • SetReboot
        • StartSelfTest
        • StopSelfTest
        • SetLight
        • SetTransition
        • GetStatus
        • UpdateDeviceSslCertification
      • FlexOVL_540_171101_2
        • FlexOVL_540_171101_2_out.icd
        • GetStatus
        • EventNotification
    • DLMS / COSEM
      • DLMS protocol adapter configuration
      • DLMS device simulator
    • OSLP
      • OSLP v0.5.1
        • Protobuf Contract
      • OSLP v0.6.1
        • Protobuf Contract
        • RegisterDevice
        • ConfirmRegisterDevice
        • GetConfiguration
        • SetConfiguration
        • SetEventNotifications
        • EventNotification
        • SetSchedule
        • ResumeSchedule
        • GetFirmwareVersion
        • UpdateFirmware
        • SetReboot
        • StartSelfTest
        • StopSelfTest
        • SetLight
        • SetTransition
        • GetStatus
        • UpdateDeviceSslCertification
        • SetDeviceVerificationKey
        • SwitchFirmware
        • SwitchConfiguration
    • MQTT
  • Support
  • License
Powered by GitBook
On this page
  • Setting Up the Open Smart Grid Platform Development environment
  • Lombok
  • Importing Maven Projects into Eclipse
  • Creating an Apache Tomcat Server
  • Setting Up Apache Tomcat Server Context
  • Deploying all Open Smart Grid Platform components to Apache Tomcat Server
  • Starting Apache ActiveMQ
  • Starting Apache Tomcat Server
  • Probe
  • Starting pgAdmin III and Connect to PostgreSQL
  • Creating the 'test-org' Organization (in database osgp-core)

Was this helpful?

Export as PDF
  1. General User's Guide
  2. Installation Guide

Platform Setup

PreviousGitHub configurationNextTest the Platform

Last updated 1 year ago

Was this helpful?

Setting Up the Open Smart Grid Platform Development environment

This chapter describes all the steps needed to finalize the open smart grid platform development environment.

Lombok

The platform uses Lombok annotations to generate extra Java methods. Without Lombok the project is not imported correctly by Maven and will not run. If you used the Vagrant installation method it should already be installed. To check if Lombok is properly installed to go Help > About Eclipse IDE and scroll down. Here you will see: Lombok <version> "<version name>" is installed. https://projectlombok.org/. If not follow this to install Lombok.

Importing Maven Projects into Eclipse

Open Eclipse by clicking the shortcut on the Desktop and import the projects.

Go to File -> Import -> Existing Maven Projects, browse to folder /home/dev/Sources/OSGP

Import the projects from location /home/dev/Sources/OSGP/open-smart-grid-platform.

Creating an Apache Tomcat Server

In Eclipse go to Window -> Open Perspective -> Debug

In the 'Debug' perspective, go to the 'Servers' view and add a new Apache Tomcat server, Tomcat is available in the folder /home/dev/Tools/tomcat (or in another location if you didn't set up a VM using Vagrant, the latest version usually works fine).

Click on Next

Click on Finish

Make sure that Tomcat is using the correct Java Runtime Environment:

Click on 'Runtime Environment', 'Installed JREs' and click 'Add'. Choose 'next' with 'Standard VM' highlighted. Click 'Directory' and in the folder browser that is shown, use the key combination 'Ctrl + h' to show hidden files. Choose '.sdkman/candidates/java/current' and select 'Open' and 'Finish'. In the 'Installed JREs' screen, unselect the default JVM (which will be an Eclipse hotspot JVM) and select '/home/dev/.sdkman/candidates/java/current' then close the screen by clicking 'Apply and Close'. The last step is to choose the new JRE which was just added in the dropdown of the 'Runtime Environment' screen by selecting '17.0.5'. Click 'Finish' to apply.

Setting Up Apache Tomcat Server Context

All modules contain their own context.xml. In the module specific context.xml are the environment variables defined where the global and module specific configuration files are located. Default they will point to a location in /etc/osp/.

Deploying all Open Smart Grid Platform components to Apache Tomcat Server

Starting Apache ActiveMQ

Continue with starting Apache ActiveMQ. If you installed an environment as described with Vagrant, you can double click the ActiveMQ shortcut on the desktop.

Alternatively you can open a terminal and run the executable manually by using the following command: (the executable can be found in the folder /home/dev/Tools/activemq/bin)

./activemq console

Starting Apache Tomcat Server

With ActiveMQ running, the Tomcat server can be started. Go to Eclipse, go to the Servers tab in the Debug view, and right click on the Tomcat server and select 'Start'.

note: In case of an error starting up for the very first time, try and start up only the module: 'osgp.core' first. This makes sure the database scripts are executed.

Probe

Starting pgAdmin III and Connect to PostgreSQL

Open pgAdminIII and configure a connection: choose the 'Add a connection to a server.' and fill out the fields using

  • Host: localhost

  • Port: 5432

  • Username: osp_admin

  • Password: 1234

Creating the 'test-org' Organization (in database osgp-core)

Run the script in /home/dev/Sources/OSGP/Config/sql/create-test-org.sql to insert 'test-org' organization into the organisation table of the osgp_core database.

psql -U osp_admin -h localhost -d osgp_core -f /home/dev/Sources/OSGP/Config/sql/create-test-org.sql

If asked for a password, enter 1234

Go back to PgAdmin III, expand servers, select localhost -> databases -> osgp_core -> Schemas -> public -> Tables. Right click the organisation table and select to view data for the top 100 rows. Confirm that the test-org organisation has been added to the Database.

Now that everything has been set up, continue to the next chapter to start testing the Platform by sending it some requests.

After adding the server, double click on the Tomcat server in the 'Servers' view and set the following configuration: under 'Timeouts' set 'Start' to 600 and 'Stop' to 30.

Click on 'Open launch configuration', click on the 'Arguments' tab and add the following at the end of the 'VM arguments': -Xms512m -Xmx2048m -Xss512k -XX:MaxMetaspaceSize=1024m -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -Dcom.sun.management.jmxremote=true

If you want to deviate from this, you might set up the context.xml in Tomcat to be able to redirect in one file to different locations. This is optional and not required. In order to use a custom context.xml, copy the entries in /home/dev/Sources/OSGP/Config/tomcat/context.xml.sample to the Tomcat context.xml in the eclipse Servers folder, to map configuration file names to file paths.

Continue by adding the Maven Projects to the Tomcat server by right clicking on the Tomcat server and choosing 'Add and Remove'. Select all available resources, except for osgp-protocol-simulator-61850 (which is for advanced use and requires additional configuration), then click the 'Add' button. At this point, eclipse's auto-build should have built the projects, and the Tomcat server has been setup.

This starts ActiveMQ as a terminal process (this way, ActiveMQ doesn't detach from the terminal and starts running as a daemon).

This is an optional program that shows the status of the Tomcat resources in real time. To install Probe you can follow this . Note that you need to add the Tomcat users in the guide's Security part in the tomcat-users.xml in your Eclipse environment. To download the war file go to: . You need to copy the war file to: /home/dev/<your Eclipse workspace>/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/webapps.

guide
https://github.com/psi-probe/psi-probe/releases
guide
alt text
alt text
alt text
alt text
alt text
alt text
alt text
alt text
alt text
alt text
alt text
alt text
alt text
alt text
alt text
alt text
alt text