Commit 171fe4b2 authored by Christos Tranoris's avatar Christos Tranoris
Browse files

Initial commit

parent d1b16106
Loading
Loading
Loading
Loading

.classpath

0 → 100644
+38 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="src" output="target/classes" path="src/main/java">
		<attributes>
			<attribute name="optional" value="true"/>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
		<attributes>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="src" output="target/test-classes" path="src/test/java">
		<attributes>
			<attribute name="test" value="true"/>
			<attribute name="optional" value="true"/>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
		<attributes>
			<attribute name="test" value="true"/>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
		<attributes>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
		<attributes>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="output" path="target/classes"/>
</classpath>
+6 −0
Original line number Diff line number Diff line
eclipse.preferences.version=1
encoding//src/main/java=utf-8
encoding//src/main/resources=utf-8
encoding//src/test/java=utf-8
encoding//src/test/resources=utf-8
encoding/<project>=UTF-8
+8 −0
Original line number Diff line number Diff line
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=17
+4 −0
Original line number Diff line number Diff line
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

Dockerfile

0 → 100644
+65 −0
Original line number Diff line number Diff line
FROM ibm-semeru-runtimes:open-17.0.7_7-jdk
MAINTAINER osl.etsi.org

# Update the package list and install dependencies for Docker and Python3
RUN apt-get update && apt-get install -y \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg \
    lsb-release \
    python3 \
    git \
    python3-pip \
    build-essential
    

# Create a directory for the Docker GPG key
RUN mkdir -p /etc/apt/keyrings

# Download the Docker GPG key and save it in the keyrings directory
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg

# Set up the stable repository for Docker
RUN echo \
    "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \
    | tee /etc/apt/sources.list.d/docker.list > /dev/null

# Update the package index and install Docker CLI
RUN apt-get update && apt-get install -y docker-ce-cli && apt-get install -y yamllint  && apt-get install -y iproute2

# Install PyYAML using pip3
RUN pip3 install PyYAML


# Update the package index and install Docker CLI
RUN apt-get update && apt-get install -y docker-ce-cli
#copy the config file so the service can connect to cluster
RUN mkdir /root/.kube
COPY src/main/resources/config /root/.kube

# Set the working directory inside the container
WORKDIR /opt

# Copy the tar.gz file from the build context (where the Dockerfile is located)
# to the /opt directory in the container
COPY src/main/resources/sylva-core-deploy.tar.gz /opt/

# Create the /opt/sylva-core directory and extract the tar.gz file into it
RUN tar -xzf /opt/sylva-core-deploy.tar.gz -C /opt \
    && mv /opt/sylva-core-deploy /opt/sylva-core

# Optional: remove the tar.gz file after extracting 
RUN rm /opt/sylva-core-deploy.tar.gz

#copy the management-cluster-kubeconfig
COPY src/main/resources/management-cluster-kubeconfig /opt/sylva-core/management-cluster-kubeconfig


# Set the working directory to the extracted folder (if you want to use it later)
WORKDIR /opt/sylva-core

RUN git config --global --add safe.directory /opt/sylva-core

COPY target/org.etsi.osl.controllers.sylva-0.0.1-SNAPSHOT-exec.jar /opt/sylva-core
CMD ["java", "-jar", "/opt/sylva-core/org.etsi.osl.controllers.sylva-0.0.1-SNAPSHOT-exec.jar"]
 No newline at end of file
Loading