| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Reference implementation of four OSLC Servers covering each of the 4 OSLC Domains:
Follow the 3 sections below to:
There are multiple options to run the OSLC Server.
This is the simplest option if you don't want to use anything except JDK and a Maven installation. Prerequisites:
Follow these steps to start 4 servers:
cd src/
mvn clean install
# if you have Docker running, you can run integration and acceptance tests
# mvn clean verify -Pacceptance
cd server-rm/
mvn clean jetty:run-war
cd ../server-cm/
mvn clean jetty:run-war
cd ../server-qm/
mvn clean jetty:run-war
cd ../server-am/
mvn clean jetty:run-warAfter following these steps, proceed to the steps listed in the next section Navigating OSLC servers.
If you wish to run 4 OSLC servers as 4 containers similar to how one would deploy them in the cloud, you could follow steps listed in this subsection. Prerequisites:
Docker Compose setup was also tested with Rancher Desktop 1.0.1.
cd src/ # Using Docker Compose docker compose up --build
Make sure all is up and running:
$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 7a719e58b909 refimpl-server-am "/docker-entrypoint.…" 2 seconds ago Up 1 second 0.0.0.0:8803->8080/tcp oslc-refimpl-am ea678fe26dbe refimpl-server-qm "/docker-entrypoint.…" 10 seconds ago Up 10 seconds 0.0.0.0:8802->8080/tcp oslc-refimpl-qm e7cdcb427f78 refimpl-server-cm "/docker-entrypoint.…" 19 seconds ago Up 18 seconds 0.0.0.0:8801->8080/tcp oslc-refimpl-cm 37b905ccc0a0 refimpl-server-rm "/docker-entrypoint.…" 28 seconds ago Up 27 seconds 0.0.0.0:8800->8080/tcp oslc-refimpl-rm
After following these steps, proceed to the steps listed in the next section Navigating OSLC servers.
To see logs:
docker logs oslc-refimpl-am -f
Pre-built Docker images are available from GitHub Container Registry for both x86_64 (amd64) and ARM64 architectures:
# Run individual servers with latest images
docker run -p 8800:8080 ghcr.io/oslc-op/refimpl/server-rm:latest
docker run -p 8801:8080 ghcr.io/oslc-op/refimpl/server-cm:latest
docker run -p 8802:8080 ghcr.io/oslc-op/refimpl/server-qm:latest
docker run -p 8803:8080 ghcr.io/oslc-op/refimpl/server-am:latest
# Or run specific versions
docker run -p 8800:8080 ghcr.io/oslc-op/refimpl/server-rm:0.3.0
docker run -p 8801:8080 ghcr.io/oslc-op/refimpl/server-cm:0.3.0
docker run -p 8802:8080 ghcr.io/oslc-op/refimpl/server-qm:0.3.0
docker run -p 8803:8080 ghcr.io/oslc-op/refimpl/server-am:0.3.0Note: Images are automatically rebuilt weekly to ensure the latest security updates from base images.
cd src/
docker compose -f docker-compose.tomcat.yml up --buildcd src/
mvn clean install
# if you have Docker running, you can run integration and acceptance tests
# mvn clean verify -Pacceptance
cd server-rm/
mvn clean package cargo:run -D"cargo.maven.containerId=tomcat10x" -Pwith-jstl-impl
cd ../server-cm/
mvn clean package cargo:run -D"cargo.maven.containerId=tomcat10x" -Pwith-jstl-impl
cd ../server-qm/
mvn clean package cargo:run -D"cargo.maven.containerId=tomcat10x" -Pwith-jstl-impl
cd ../server-am/
mvn clean package cargo:run -D"cargo.maven.containerId=tomcat10x" -Pwith-jstl-impl
Once running, you can populate the reference implementation servers with some OSLC resources using one of these 2 alternatives:
With a Kotlin plugin or IntelliJ: run the client under src/client-toolchain/src/main/kotlin/co/oslc/refimpl/client/Main.kt
As a java program: run the client using java -jar client-toolchain/target/client-toolchain.jar.
Parameters:
After that, OSLC servers are available at the following URLs:
By default, the servers use http://localhost:8080 as the base URL. You can override this using the LYO_BASEURL environment variable to configure the public-facing URL for each server. This is particularly useful when:
Examples:
For a reverse proxy deployment where the RM server is accessible at https://mytoolchain.example.com:9443/refimpl/rm/:
export LYO_BASEURL=https://mytoolchain.example.com:9443/refimpl/rmWhen using Docker Compose, set environment variables for each service:
services:
server-rm:
environment:
- LYO_BASEURL=https://mytoolchain.example.com:9443/refimpl/rmSee the commented examples in docker-compose.yml for more details.
Note: The servlet path (e.g., /services/) is automatically appended to the base URL, so you should only specify the base path up to but not including /services/.
Currently, OAuth 1.0 with Basic fallback is enabled only on the OSLC RM server (port 8800). Use admin:admin credentials for Basic authentication. In order to enable OAuth support on other servers, uncomment the following lines under src/main/webapp/WEB-INF/web.xml of each server:
<filter>
<display-name>CredentialsFilter</display-name>
<filter-name>CredentialsFilter</filter-name>
<filter-class>co.oslc.refimpl.rm.gen.servlet.CredentialsFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>CredentialsFilter</filter-name>
<url-pattern>/services/*</url-pattern>
</filter-mapping>Swagger endpoints are available at the following URIs (use sp_single as a serviceProviderId where required):
Root Services for the RM Server is under: http://localhost:8800/services/rootservices (similar for other servers).
The Reference Implementation code and Lyo Designer model are licensed under the Apache License v2.0. See the LICENSE file for the full text of the license.
| Back | FazBrowse Home | New Git URL |