Packaging your app for deployment on OPS-SAT¶
Table of contents
Packaging your app for testing on the ground is slightly different from testing your app on a satellite or a flat-sat. In this tutorial you will learn how to package your app for deployment on OPS-SAT or get it ready for flat-sat tests.
Note: This does not produce an actual package, but only the file tree required to generate a package. The actual IPK for OPS-SAT testing and operations is generated by ESA for security and auditing reasons. The operational IPK generation instructions can be found under https://opssat1.esoc.esa.int/projects/experimenter-information/wiki/Building_and_submitting_your_application_to_ESOC (you have to be registered as an OPS-SAT experimenter)
Getting the right files¶
In short, you will need to: clone a repository, change some configuration files, run maven to generate the directory structure, and zip that directory. So, let’s jump into it!
Clone the NMF Mission OPS-SAT repository.
Checkout the
devbranch to get the latest version.Ensure your local maven repository has the latest NMF Core and NMF Mission OPS-SAT artifacts by running
mvn installin both NMF Core and and NMF Mission OPS-SAT repository clones.Ensure your local maven repository has the latest artifacts of your application by running
mvn installin your application project.Open the
pom.xmlfile in theopssat-package/experimentdirectory.In the properties, edit your experimenter ID
expId,expApid(typically APID equals to sum ofexpId + 1024), and the Maven information for your app. Make sure thatexpVersionmatches the version defined in your app’s POM.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | <properties> <!-- Change the following 4 properties to match the information of your app --> <!-- The declared version is arbitrary and does not have to match the NMF version, but only the app version --> <expId>000</expId> <expApid>1024</expApid> <expMainClass>esa.mo.nmf.apps.PayloadsTestApp</expMainClass> <expVersion>2.1.0-SNAPSHOT</expVersion> <!-- Do not change the following --> <esa.nmf.mission.opssat.assembly.outputdir>${project.build.directory}/experiment-package</esa.nmf.mission.opssat.assembly.outputdir> </properties> <dependencies> <dependency> <groupId>int.esa.nmf.sdk.examples.space</groupId> <artifactId>payloads-test</artifactId> <version>${expVersion}</version> </dependency> </dependencies> |
In the default
artifactItemsconfiguration of theexpLibexecution of themaven-dependency-plugininside the you need to change the Maven qualifiers to match those of your app once again. You must also add anartifactItemfor each external dependency that you app has.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | <artifactItems> <artifactItem> <!-- Change the following 3 properties to locate JAR your app needs --> <groupId>int.esa.nmf.sdk.examples.space</groupId> <artifactId>payloads-test</artifactId> <version>${expVersion}</version> <!-- Do not change the following --> <type>jar</type> <overWrite>true</overWrite> <outputDirectory>${esa.nmf.mission.opssat.assembly.outputdir}/home/exp${expId}/lib/</outputDirectory> </artifactItem> <artifactItem> <groupId>com.example</groupId> <artifactId>your_dependency</artifactId> <version>x.x.x</version> <type>jar</type> <overWrite>true</overWrite> <outputDirectory>${esa.nmf.mission.opssat.assembly.outputdir}/home/exp${expId}/lib/</outputDirectory> </artifactItem> <artifactItems> |
You can also add additional copy tasks to package additional files that your app requires by editing
ant_copy_jobs.xmlfile. These copy tasks will be executed by theMaven AntRun Plugin.Invoke
mvn clean packagein theopssat-package/experimentdirectory.Go to the folder
target/experiment-package/and you will find the directory structure to package your app as an IPK for OPS-SAT.Zip the generated directory structure and send it to OPS-SAT’s Flight Control Team (FCT) by following the guide instructions in: https://opssat1.esoc.esa.int/projects/experimenter-information/wiki/Building_and_submitting_your_application_to_ESOC