From a5a094a199226f312e795c3019c5793094e5378e Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Tue, 24 Mar 2015 01:23:32 -0400 Subject: TOPIC: ODL DOCKER AUTHOR: DANIEL SMITH *** PLEASE MERGE ** UPDATED TO REFLECT INPUT FRMO J. BJUREL - fixed whitespaces - fixed location of .erb file (they should have been in templates - the directory was there just int he wrong spot) - removed opcheck.pp from common opnfv class - Removed Debug from fuel/build/Makefile :) UPDATE: Input from S. Berg and F. Bockners incorporated. Merge required before we can refactor to common puppet manifest directory This patchset delivers the folowing functionality: - implementation of the common/opnfv-puppet structure / move of .pp files and update of f_odl_docker to build / source from there - creation of f_odl_doc subclass - fetch of latest stable release of ODL - fetch of latest docker binary release (TODO: this will be changed in next patchset push) - build of docker container with all needed libs and port exposure for DLUX and OVSDB/ODL with Openstack Integration (OVS Manager) - deployment of both the target odl docker image as well as the docker runtime binary to the control nodes via puppet script. GENERATES: - docker-latest - binary of docker for use on control node - odl_docker_image.tar - a docker container with a ODL controller running DLUX and OVSDB ENABLE / DISABLE: - Comment/Un-comment "SUBDIRS += f_odl_doc in base (fuel/build/) Makefile Breakdown of Update / Edits per File: ===================================== fuel/build/Makefile - Modified include to capture the newly created f_odl_doc directory fuel/build/f_odl_docker/Makefile - Fetches libraries and produces two outputs: docker-latest - binary of docker (actually lxc-docker cause ODL Container is running 12.04 (precise) libraries - i.e java7, tz 12.04, etc) odl_docker_image.tar - this is a docker image defined in ./dockefile/Dockerfile and contains the ODL distro + setup and deployment scripts for runtime on the target control node. fuel/build/f_odl_docker/dockerfile/Dockerfile - This Dockerfile defined the packages for use in the Docker Container that will run ODL with DLUX and OVSDB submodules. It also defines the ports to be exposed to the HOST OS (and thus as well through docker the ODL Controller exists in a private, but routable via but the fuel (10.20.0.0/16) and the tenants public network since docker handles the mapping (see the docker run command in the start_odl_docker.sh script) fuel/build/f_odl_docker/dockerfile/check_feature.sh - Simple expect script that starts up a client and checks that the features are installed (used during visual demo only) TODO - Replace with API call to ODL KARAF to install features (LOOKUP - Dont know how to address Karaf programatically - LOOKUP) fuel/build/f_odl_docker/dockerfile/speak.sh - Expect script called by odl_start_docker.sh once karaf is up to install the features that we need (runtime inside container script) called via ENTRYPOINT in Dockerfile at runtime on control node. fuel/build/f_odl_docker/dockerfile/start_odl_docker.sh - This is the CMD/ENTRYPOINT defined in docker and is what is called from the controller when you start the container (note: This runs inside the conatiner), not to be confused with staring the actual container on the control node). This script fires up Karaf first time, loads DLUX and OVSDB modules and monitors that the container is up. The container itself is started on the control node via /opt/opnfv/start_odl_container.sh which includes the syntax for the port mapping (RANDOM or 1:1). TODO - integrate into controller monitor script to ensure better handling (stop, start, monitor) of docker processes remove expect helper scripts and replace with API/JSON or some other appropriate method to KARAF fuel/build/f_odl_docker/puppet/modules/opnfv/manifests/odl_doc.pp - This puppet manifest defined where the docker binary and docker image should be placed on the target control node. /opt/opnfv/start_odl_container.sh will install docker binary package (if necessary) and load ODL docker image into docker, start the image. This file just ensures placement in /opt/opnfv/odl_docker fuel/build/f_opnfv_puppet/puppet/modules/opnfv/manifests/init.pp (MODIFICATION): - Removed previous includes and updated to have only f_odl_doc added fuel/build/f_odl_doc/scripts/start_odl_container.sh - this is the control script that will start the docker container (to be run on the control node), this is deployed this is deployed to /opt/opnfv on the control node via odl_doc puppet manifest file. JIRA: DEPRECATED: Deleted files are no longer needed due to new implementation of ODL. Change-Id: I26c13cc468a2aba18af78b7a3c78a719033f03e0 Signed-off-by: Daniel Smith --- fuel/build/f_java/Makefile | 42 --------------------- fuel/build/f_java/README | 44 ---------------------- .../f_java/puppet/modules/opnfv/manifests/java.pp | 11 ------ fuel/build/f_java/testing/README | 12 ------ fuel/build/f_java/testing/fake_init.pp | 13 ------- 5 files changed, 122 deletions(-) delete mode 100644 fuel/build/f_java/Makefile delete mode 100644 fuel/build/f_java/README delete mode 100644 fuel/build/f_java/puppet/modules/opnfv/manifests/java.pp delete mode 100644 fuel/build/f_java/testing/README delete mode 100644 fuel/build/f_java/testing/fake_init.pp (limited to 'fuel/build/f_java') diff --git a/fuel/build/f_java/Makefile b/fuel/build/f_java/Makefile deleted file mode 100644 index 759081f..0000000 --- a/fuel/build/f_java/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -############################################################################## -# Copyright (c) 2015 Ericsson AB and others. -# stefan.k.berg@ericsson.com -# jonas.bjurel@ericsson.com -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -TOP := $(shell pwd) -include ../config.mk - -PACKAGE := openjdk-8-jdk -VERSION := 8u40~b09-1_amd64 -DEB_NAME := $(PACKAGE)_$(VERSION).deb - -.PHONY: all -all: release/pool/main/$(DEB_NAME) - -release/pool/main/$(DEB_NAME): -ifeq ($(JAVA_MAIN_REPO),) - @echo "No config-spec target for Java, nothing to build" -else - @mkdir -p release/pool/main && \ - cd release/pool/main && \ - wget -N $(JAVA_MAIN_REPO)/$(DEB_NAME) - @lintian release/pool/main/$(DEB_NAME) -endif - -.PHONY: clean -clean: - @rm -rf release - @rm -f $(DEB_DEST)/$(DEB_NAME) - - -.PHONY: release -release:release/pool/main/$(DEB_NAME) -ifneq ($(JAVA_MAIN_REPO),) - @cp release/pool/main/$(DEB_NAME) $(DEB_DEST) - @cp -Rvp puppet/modules/* $(PUPPET_DEST) -endif diff --git a/fuel/build/f_java/README b/fuel/build/f_java/README deleted file mode 100644 index 776d47a..0000000 --- a/fuel/build/f_java/README +++ /dev/null @@ -1,44 +0,0 @@ -############################################################################## -# Copyright (c) 2015 Ericsson AB and others. -# stefan.k.berg@ericsson.com -# jonas.bjurel@ericsson.com -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -This directory adds the openjdk-8-jdk Java package and related puppet -deployment manifest such that it gets built into the .iso image an deployed -on the stack controller cluster. - -The f_java has the following structure: -. -+--------+----------+-----------+ - | | | - puppet/ Makefile README - | (this file) - | - | - modules/ - | - | - | - opnfv/ - | - | - | - manifests/ - | - | - | - java.pp - -Makefile: -Invoked by the git root Makefile, it pulls the openjdk-8-jdk deb package -from a propper mirror and pushes i together with the manifests to a fuel -build artifact directory, such that it eventually gets built into the new -fuel .iso - -java.pp: -Controls the installation and configuration of java diff --git a/fuel/build/f_java/puppet/modules/opnfv/manifests/java.pp b/fuel/build/f_java/puppet/modules/opnfv/manifests/java.pp deleted file mode 100644 index 26e7c39..0000000 --- a/fuel/build/f_java/puppet/modules/opnfv/manifests/java.pp +++ /dev/null @@ -1,11 +0,0 @@ -class opnfv::java { - if $::osfamily == 'Debian' { - case $::fuel_settings['role'] { - /controller/: { - package { 'openjdk-8-jdk': - ensure => installed, - } - } - } - } -} diff --git a/fuel/build/f_java/testing/README b/fuel/build/f_java/testing/README deleted file mode 100644 index c0ef7d6..0000000 --- a/fuel/build/f_java/testing/README +++ /dev/null @@ -1,12 +0,0 @@ -############################################################################## -# Copyright (c) 2015 Ericsson AB and others. -# stefan.k.berg@ericsson.com -# jonas.bjurel@ericsson.com -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -In order to test the functionality without performing a full deployment, run "puppet apply" on the -fake_init.pp which will call only the opnfv::java class. diff --git a/fuel/build/f_java/testing/fake_init.pp b/fuel/build/f_java/testing/fake_init.pp deleted file mode 100644 index 237b0c1..0000000 --- a/fuel/build/f_java/testing/fake_init.pp +++ /dev/null @@ -1,13 +0,0 @@ -############################################################################## -# Copyright (c) 2015 Ericsson AB and others. -# stefan.k.berg@ericsson.com -# jonas.bjurel@ericsson.com -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -$fuel_settings = parseyaml($astute_settings_yaml) - -include opnfv::java -- cgit 1.2.3-korg