-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from ayushishu/main
Enhance Documentation with README.md for Builder and Robot Docker Images
- Loading branch information
Showing
3 changed files
with
117 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# OpenDaylight Builder Docker Image | ||
|
||
The provided Dockerfile is intended for building OpenDaylight projects. It sets up an environment with the necessary dependencies, including Java and Maven, to build OpenDaylight projects from source code. You can use this Docker image to build the OpenDaylight projects | ||
|
||
## Building the Docker Image | ||
|
||
You can build the Docker image for the desired base system (Ubuntu or CentOS) using the following commands: | ||
|
||
### Ubuntu Base Builder Image | ||
|
||
``` | ||
$ docker build -t builder_image_name ./Ubuntu/ | ||
``` | ||
### CentOS Base Builder Image | ||
``` | ||
$ docker build -t builder_image_name .\Centos\ | ||
``` | ||
Replace Builder_Image_Name with your preferred image name. | ||
|
||
### Using the Builder Image for MVN Builds | ||
Once you've built the Builder image, follow these steps to perform MVN builds within a Docker container: | ||
|
||
1) Launch a Docker container: | ||
``` | ||
$ docker run --name my-builder-container builder_image_name bash -c "tail -f /dev/null" | ||
``` | ||
2) Access the Docker container: | ||
``` | ||
$ docker exec -it my-builder-container bash | ||
``` | ||
3) Inside the Docker container, clone the OpenDaylight repository you want to build: | ||
``` | ||
$ git clone https://git.opendaylight.org/gerrit/integration/distribution | ||
$ cd distribution | ||
``` | ||
4) Run the Maven (MVN) build: | ||
``` | ||
mvn clean install | ||
``` | ||
This will initiate the build process for the OpenDaylight project. Make sure you replace the example Git URL (https://git.opendaylight.org/gerrit/integration/distribution) with the URL of the specific OpenDaylight repository you intend to build. | ||
By following these steps, you can use the provided Docker image to build OpenDaylight projects with a consistent development environment. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Robot Framework Docker Container | ||
|
||
This Dockerfile facilitates the creation of a Docker image that comprises a comprehensive Robot Framework environment built on CentOS 8. The image is equipped with Python 3.10.2, Java 17, and all the necessary dependencies essential for executing Robot Framework tests efficiently. | ||
|
||
## Prerequisites | ||
|
||
Before you proceed with building and running this Docker image, ensure that you have Docker properly installed on your system. | ||
|
||
## How to Use | ||
|
||
To seamlessly build the Docker image and execute Robot Framework tests within a container, adhere to the following steps: | ||
|
||
Step 1: Clone the Repository | ||
|
||
Begin by cloning this repository to your local machine: | ||
|
||
``` | ||
git clone https://github.com/askb/releng-docker | ||
cd robot-framework-docker | ||
``` | ||
Step 2: Build the Docker Image | ||
Execute the following command to build the Docker image: | ||
|
||
``` | ||
docker build -t robot-framework:latest . | ||
``` | ||
|
||
Step 3: Run a Docker Container | ||
Once the image has been successfully constructed, launch a Docker container from it. You have the flexibility to replace 'my-robot-container' with a name of your choice: | ||
``` | ||
docker run -it --network=host --name my-robot-container robot-framework:latest bash -c "tail -f /dev/null" | ||
``` | ||
Ensure that opendaylight and Robot containers are on the same Docker network. | ||
|
||
You can now access the container using | ||
`$ docker exec -it my-robot-container bash ` | ||
|
||
Step 4: Run the OpenDaylight container on the same network. | ||
``` | ||
docker run -d --name opendaylight --network=host opendaylight-image --env FEATURES=odl-restconf,odl-netconf-topology | ||
``` | ||
Step 5: Clone the integration-test repository | ||
``` | ||
docker exec robot-container bash -c 'git clone https://github.com/opendaylight/integration-test.git" | ||
``` | ||
Step 6: Run single integration test | ||
``` | ||
docker exec robot-container bash -c ' | ||
robot -L debug --variable KARAF_HOME:/home/user/workspace/netconf/karaf/target/assembly/bin --variable USER_HOME:/home/jenkins --variable DEFAULT_LINUX_PROMPT:\$ --variable ODL_SYSTEM_IP:127.0.0.1 --variable ODL_SYSTEM_1_IP:127.0.0.1 --variable RESTCONFPORT:8181 --variable IS_KARAF_APPL:True ./test.robot' | ||
``` | ||
For Example | ||
``` | ||
docker exec robot bash -c 'git clone https://github.com/opendaylight/integration-test.git && | ||
cd integration-test/csit/suites/daexim && | ||
robot -L debug --variable USER_HOME:/root \ | ||
--variable WORKSPACE:/home/youruser \ | ||
-v BUNDLEFOLDER:karaf-0.18.1 \ | ||
-v ODL_STREAM:argon \ | ||
--variable DEFAULT_LINUX_PROMPT:\$ \ | ||
--variable ODL_SYSTEM_USER:youruser \ | ||
--variable ODL_SYSTEM_IP:localhost \ | ||
--variable ODL_SYSTEM_1_IP:localhost \ | ||
-v IS_KARAF_APPL:True \ | ||
./010-special-export.robot 020-import-basic.robot 030-export-basic.robot 040-export-inclusions.robot ' | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters