From 230c540cf52f3fbe05d40d6650a97d1e55327249 Mon Sep 17 00:00:00 2001 From: Mike Marchetti Date: Wed, 20 Sep 2017 13:43:06 -0400 Subject: [PATCH] update descriptor-packages build process Change-Id: I937d0897a051b655f9de87f49a88610a37c9297e Signed-off-by: Mike Marchetti --- descriptor-packages/.gitignore | 2 + descriptor-packages/Makefile | 136 +----------------- descriptor-packages/mk/dirs.mk | 29 ++++ descriptor-packages/mk/pkg.mk | 68 +++++++++ descriptor-packages/nsd/Makefile | 18 +++ descriptor-packages/nsd/VyOS_ns/Makefile | 20 +++ .../VyOS_ns => nsd/VyOS_ns/src}/VyOS_nsd.yaml | 0 .../VyOS_ns/src}/icons/osm_2x.png | Bin .../nsd/cirros_2vnf_ns/Makefile | 20 +++ .../cirros_2vnf_ns/src}/cirros_2vnf_nsd.yaml | 0 .../cirros_2vnf_ns/src}/icons/osm_2x.png | Bin descriptor-packages/nsd/cirros_ns/Makefile | 20 +++ .../cirros_ns/src}/cirros_nsd.yaml | 0 .../cirros_ns/src}/icons/osm_2x.png | Bin .../nsd/ims_allin1_corpa/Makefile | 20 +++ .../ims_allin1_corpa/src}/IMS-corpA__nsd.yaml | 0 .../ims_allin1_corpa/src}/icons/osm_2x.png | Bin .../src}/vnf_config/IMS-ALLIN1_2p__1.yaml | 0 descriptor-packages/nsd/ping_pong_ns/Makefile | 20 +++ .../ping_pong_ns/src}/icons/rift_logo.png | Bin .../ping_pong_ns/src}/ping_pong_nsd.yaml | 0 .../src}/scripts/start_traffic.py | 0 descriptor-packages/nsd/ref1_ns/Makefile | 20 +++ .../ref1_ns => nsd/ref1_ns/src}/ref1_nsd.yaml | 0 descriptor-packages/nsd/ref2_ns/Makefile | 20 +++ .../ref2_ns => nsd/ref2_ns/src}/ref2_nsd.yaml | 0 .../nsd/ubuntu_cirros_multidisk_ns/Makefile | 20 +++ .../src}/icons/osm_2x.png | Bin .../src}/ubuntu_cirros_multidisk_nsd.yaml | 0 .../nsd/ubuntu_xenial_ns/Makefile | 20 +++ .../ubuntu_xenial_ns/src}/icons/osm_2x.png | Bin .../src}/ubuntu_xenial_nsd.yaml | 0 .../{src => tools}/gen_nsd_pkg.sh | 4 +- .../{src => tools}/gen_vnfd_pkg.sh | 4 +- .../{src => tools}/generate_descriptor_pkg.sh | 9 +- descriptor-packages/vnfd/Makefile | 18 +++ descriptor-packages/vnfd/VyOS_vnf/Makefile | 21 +++ .../VyOS_vnf/src}/VyOS__vnfd.yaml | 0 .../VyOS_vnf/src}/icons/osm_2x.png | Bin descriptor-packages/vnfd/cirros_vnf/Makefile | 19 +++ .../cirros_vnf/src}/cirros_vnfd.yaml | 0 .../cirros_vnf/src}/icons/cirros-64.png | Bin .../vnfd/ims_allin1_2p_vnf/Makefile | 20 +++ .../src}/IMS-ALLIN1__vnfd.yaml | 0 .../src}/icons/metaswitch_2x.png | Bin descriptor-packages/vnfd/ping_vnf/Makefile | 21 +++ .../src}/cloud_init/ping_cloud_init.cfg | 0 .../ping_vnf/src}/icons/rift_logo.png | Bin .../ping_vnf/src}/ping_vnfd.yaml | 0 descriptor-packages/vnfd/pong_vnf/Makefile | 21 +++ .../src}/cloud_init/pong_cloud_init.cfg | 0 .../pong_vnf/src}/icons/rift_logo.png | Bin .../pong_vnf/src}/pong_vnfd.yaml | 0 descriptor-packages/vnfd/ref11_vnf/Makefile | 20 +++ .../ref11_vnf/src}/ref11_vnfd.yaml | 0 descriptor-packages/vnfd/ref12_vnf/Makefile | 20 +++ .../ref12_vnf/src}/ref12_vnfd.yaml | 0 descriptor-packages/vnfd/ref21_vnf/Makefile | 21 +++ .../ref21_vnf/src}/ref21_vnfd.yaml | 0 descriptor-packages/vnfd/ref22_vnf/Makefile | 21 +++ .../ref22_vnf/src}/ref22_vnfd.yaml | 0 .../vnfd/ubuntu_cirros_multidisk_vnf/Makefile | 21 +++ .../src}/cloud_init/cloud_init.cfg | 0 .../src}/ubuntu_cirros_multidisk_vnfd.yaml | 0 .../vnfd/ubuntu_xenial_vnf/Makefile | 21 +++ .../src}/cloud_init/cloud_init.cfg | 0 .../src}/icons/ubuntu-logo14.png | Bin .../src}/ubuntu_xenial_vnfd.yaml | 0 juju-charms/.gitignore | 2 + juju-charms/Dockerfile | 4 + juju-charms/Makefile | 6 +- 71 files changed, 565 insertions(+), 141 deletions(-) create mode 100644 descriptor-packages/.gitignore create mode 100644 descriptor-packages/mk/dirs.mk create mode 100644 descriptor-packages/mk/pkg.mk create mode 100644 descriptor-packages/nsd/Makefile create mode 100644 descriptor-packages/nsd/VyOS_ns/Makefile rename descriptor-packages/{src/nsd/VyOS_ns => nsd/VyOS_ns/src}/VyOS_nsd.yaml (100%) rename descriptor-packages/{src/nsd/VyOS_ns => nsd/VyOS_ns/src}/icons/osm_2x.png (100%) create mode 100644 descriptor-packages/nsd/cirros_2vnf_ns/Makefile rename descriptor-packages/{src/nsd/cirros_2vnf_ns => nsd/cirros_2vnf_ns/src}/cirros_2vnf_nsd.yaml (100%) rename descriptor-packages/{src/nsd/cirros_2vnf_ns => nsd/cirros_2vnf_ns/src}/icons/osm_2x.png (100%) create mode 100644 descriptor-packages/nsd/cirros_ns/Makefile rename descriptor-packages/{src/nsd/cirros_ns => nsd/cirros_ns/src}/cirros_nsd.yaml (100%) rename descriptor-packages/{src/nsd/cirros_ns => nsd/cirros_ns/src}/icons/osm_2x.png (100%) create mode 100644 descriptor-packages/nsd/ims_allin1_corpa/Makefile rename descriptor-packages/{src/nsd/ims_allin1_corpa => nsd/ims_allin1_corpa/src}/IMS-corpA__nsd.yaml (100%) rename descriptor-packages/{src/nsd/ims_allin1_corpa => nsd/ims_allin1_corpa/src}/icons/osm_2x.png (100%) rename descriptor-packages/{src/nsd/ims_allin1_corpa => nsd/ims_allin1_corpa/src}/vnf_config/IMS-ALLIN1_2p__1.yaml (100%) create mode 100644 descriptor-packages/nsd/ping_pong_ns/Makefile rename descriptor-packages/{src/nsd/ping_pong_ns => nsd/ping_pong_ns/src}/icons/rift_logo.png (100%) rename descriptor-packages/{src/nsd/ping_pong_ns => nsd/ping_pong_ns/src}/ping_pong_nsd.yaml (100%) rename descriptor-packages/{src/nsd/ping_pong_ns => nsd/ping_pong_ns/src}/scripts/start_traffic.py (100%) create mode 100644 descriptor-packages/nsd/ref1_ns/Makefile rename descriptor-packages/{src/nsd/ref1_ns => nsd/ref1_ns/src}/ref1_nsd.yaml (100%) create mode 100644 descriptor-packages/nsd/ref2_ns/Makefile rename descriptor-packages/{src/nsd/ref2_ns => nsd/ref2_ns/src}/ref2_nsd.yaml (100%) create mode 100644 descriptor-packages/nsd/ubuntu_cirros_multidisk_ns/Makefile rename descriptor-packages/{src/nsd/ubuntu_cirros_multidisk_ns => nsd/ubuntu_cirros_multidisk_ns/src}/icons/osm_2x.png (100%) rename descriptor-packages/{src/nsd/ubuntu_cirros_multidisk_ns => nsd/ubuntu_cirros_multidisk_ns/src}/ubuntu_cirros_multidisk_nsd.yaml (100%) create mode 100644 descriptor-packages/nsd/ubuntu_xenial_ns/Makefile rename descriptor-packages/{src/nsd/ubuntu_xenial_ns => nsd/ubuntu_xenial_ns/src}/icons/osm_2x.png (100%) rename descriptor-packages/{src/nsd/ubuntu_xenial_ns => nsd/ubuntu_xenial_ns/src}/ubuntu_xenial_nsd.yaml (100%) rename descriptor-packages/{src => tools}/gen_nsd_pkg.sh (95%) rename descriptor-packages/{src => tools}/gen_vnfd_pkg.sh (95%) rename descriptor-packages/{src => tools}/generate_descriptor_pkg.sh (98%) create mode 100644 descriptor-packages/vnfd/Makefile create mode 100644 descriptor-packages/vnfd/VyOS_vnf/Makefile rename descriptor-packages/{src/vnfd/VyOS_vnf => vnfd/VyOS_vnf/src}/VyOS__vnfd.yaml (100%) rename descriptor-packages/{src/vnfd/VyOS_vnf => vnfd/VyOS_vnf/src}/icons/osm_2x.png (100%) create mode 100644 descriptor-packages/vnfd/cirros_vnf/Makefile rename descriptor-packages/{src/vnfd/cirros_vnf => vnfd/cirros_vnf/src}/cirros_vnfd.yaml (100%) rename descriptor-packages/{src/vnfd/cirros_vnf => vnfd/cirros_vnf/src}/icons/cirros-64.png (100%) create mode 100644 descriptor-packages/vnfd/ims_allin1_2p_vnf/Makefile rename descriptor-packages/{src/vnfd/ims_allin1_2p_vnf => vnfd/ims_allin1_2p_vnf/src}/IMS-ALLIN1__vnfd.yaml (100%) rename descriptor-packages/{src/vnfd/ims_allin1_2p_vnf => vnfd/ims_allin1_2p_vnf/src}/icons/metaswitch_2x.png (100%) create mode 100644 descriptor-packages/vnfd/ping_vnf/Makefile rename descriptor-packages/{src/vnfd/ping_vnf => vnfd/ping_vnf/src}/cloud_init/ping_cloud_init.cfg (100%) rename descriptor-packages/{src/vnfd/ping_vnf => vnfd/ping_vnf/src}/icons/rift_logo.png (100%) rename descriptor-packages/{src/vnfd/ping_vnf => vnfd/ping_vnf/src}/ping_vnfd.yaml (100%) create mode 100644 descriptor-packages/vnfd/pong_vnf/Makefile rename descriptor-packages/{src/vnfd/pong_vnf => vnfd/pong_vnf/src}/cloud_init/pong_cloud_init.cfg (100%) rename descriptor-packages/{src/vnfd/pong_vnf => vnfd/pong_vnf/src}/icons/rift_logo.png (100%) rename descriptor-packages/{src/vnfd/pong_vnf => vnfd/pong_vnf/src}/pong_vnfd.yaml (100%) create mode 100644 descriptor-packages/vnfd/ref11_vnf/Makefile rename descriptor-packages/{src/vnfd/ref11_vnf => vnfd/ref11_vnf/src}/ref11_vnfd.yaml (100%) create mode 100644 descriptor-packages/vnfd/ref12_vnf/Makefile rename descriptor-packages/{src/vnfd/ref12_vnf => vnfd/ref12_vnf/src}/ref12_vnfd.yaml (100%) create mode 100644 descriptor-packages/vnfd/ref21_vnf/Makefile rename descriptor-packages/{src/vnfd/ref21_vnf => vnfd/ref21_vnf/src}/ref21_vnfd.yaml (100%) create mode 100644 descriptor-packages/vnfd/ref22_vnf/Makefile rename descriptor-packages/{src/vnfd/ref22_vnf => vnfd/ref22_vnf/src}/ref22_vnfd.yaml (100%) create mode 100644 descriptor-packages/vnfd/ubuntu_cirros_multidisk_vnf/Makefile rename descriptor-packages/{src/vnfd/ubuntu_cirros_multidisk_vnf => vnfd/ubuntu_cirros_multidisk_vnf/src}/cloud_init/cloud_init.cfg (100%) rename descriptor-packages/{src/vnfd/ubuntu_cirros_multidisk_vnf => vnfd/ubuntu_cirros_multidisk_vnf/src}/ubuntu_cirros_multidisk_vnfd.yaml (100%) create mode 100644 descriptor-packages/vnfd/ubuntu_xenial_vnf/Makefile rename descriptor-packages/{src/vnfd/ubuntu_xenial_vnf => vnfd/ubuntu_xenial_vnf/src}/cloud_init/cloud_init.cfg (100%) rename descriptor-packages/{src/vnfd/ubuntu_xenial_vnf => vnfd/ubuntu_xenial_vnf/src}/icons/ubuntu-logo14.png (100%) rename descriptor-packages/{src/vnfd/ubuntu_xenial_vnf => vnfd/ubuntu_xenial_vnf/src}/ubuntu_xenial_vnfd.yaml (100%) create mode 100644 juju-charms/.gitignore create mode 100644 juju-charms/Dockerfile diff --git a/descriptor-packages/.gitignore b/descriptor-packages/.gitignore new file mode 100644 index 00000000..0766a22e --- /dev/null +++ b/descriptor-packages/.gitignore @@ -0,0 +1,2 @@ +nsd/*/build +vnfd/*/build diff --git a/descriptor-packages/Makefile b/descriptor-packages/Makefile index 793f30c0..61710bfc 100644 --- a/descriptor-packages/Makefile +++ b/descriptor-packages/Makefile @@ -1,5 +1,5 @@ # -# Copyright 2016 RIFT.IO Inc +# Copyright 2017 Sandvine # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,137 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -# Author(s): Austin Cormier -# Creation Date: 2016/05/23 -# -BUILD_DIR = build - -NSDS := \ - gw_corpa_ns \ - ims_allin1_corpa \ - mwc16_gen_ns \ - mwc16_pe_ns \ - VyOS_ns \ - cirros_ns \ - cirros_2vnf_ns \ - ubuntu_xenial_ns \ - ping_pong_ns \ - knt_flownac_ns \ - knt_flownac-us_ns \ - sandvine_pts_ns \ - sonussbc_ns \ - ref1_ns \ - ref2_ns \ - ubuntu_cirros_multidisk_ns - -NSD_SRC_DIR := src/nsd -NSD_BUILD_DIR := $(BUILD_DIR)/nsd - -NSD_SRC_DIRS := $(addprefix $(NSD_SRC_DIR)/, $(NSDS)) -NSD_BUILD_DIRS := $(addprefix $(NSD_BUILD_DIR)/, $(NSDS)) -NSD_PKGS := $(addsuffix .tar.gz, $(NSDS)) -NSD_BUILD_PKGS := $(addprefix $(NSD_BUILD_DIR)_pkgs/, $(NSD_PKGS)) - -VNFDS := \ - 6wind_vnf \ - gw_corpa_pe1_vnf \ - gw_corpa_pe2_vnf \ - ims_allin1_2p_vnf \ - tidgen_mwc16_vnf \ - VyOS_vnf \ - cirros_vnf \ - ubuntu_xenial_vnf \ - ping_vnf \ - pong_vnf \ - knt_fnc_vnf \ - knt_fne_vnf \ - knt_fnu_vnf \ - knt_fnd_vnf \ - sandvine_pts_vnf \ - sonus_sbc_vnf \ - sonus_test_vnf \ - ref11_vnf \ - ref21_vnf \ - ref12_vnf \ - ref22_vnf \ - ubuntu_cirros_multidisk_vnf - -VNFD_SRC_DIR := src/vnfd -VNFD_BUILD_DIR := $(BUILD_DIR)/vnfd - -VNFD_SRC_DIRS := $(addprefix $(VNFD_SRC_DIR)/, $(VNFDS)) -VNFD_BUILD_DIRS := $(addprefix $(VNFD_BUILD_DIR)/, $(VNFDS)) -VNFD_PKGS := $(addsuffix .tar.gz, $(VNFDS)) -VNFD_BUILD_PKGS := $(addprefix $(VNFD_BUILD_DIR)_pkgs/, $(VNFD_PKGS)) - -IMS_GITHUB="https://github.com/Metaswitch/clearwater-juju.git" -CHARM_REPO="https://osm.etsi.org/gerrit/osm/juju-charms.git" - -all: $(VNFD_BUILD_PKGS) ${NSD_BUILD_PKGS} - echo $@ - -clean: - -@ $(RM) -rf $(BUILD_DIR) - -$(VNFD_BUILD_DIR)/%: $(VNFD_SRC_DIR)/% - mkdir -p $(VNFD_BUILD_DIR) - cp -rf $< $(VNFD_BUILD_DIR) - - src/gen_vnfd_pkg.sh $< $@ - -$(BUILD_DIR)/clearwater-juju: - mkdir -p $(BUILD_DIR) - -cd $(BUILD_DIR) && (test -e clearwater-juju || git clone $(IMS_GITHUB)) - -$(BUILD_DIR)/juju-charms: - mkdir -p $(BUILD_DIR) - -cd $(BUILD_DIR) && (test -e juju-charms || git clone $(CHARM_REPO)) - -cd $(BUILD_DIR)/juju-charms && make - -$(NSD_BUILD_DIR)/%: $(NSD_SRC_DIR)/% - mkdir -p $(NSD_BUILD_DIR) - cp -rf $< $(NSD_BUILD_DIR) - - src/gen_nsd_pkg.sh $< $@ - -$(BUILD_DIR)/nsd_pkgs/%.tar.gz: $(NSD_BUILD_DIR)/% - src/generate_descriptor_pkg.sh -d $(BUILD_DIR)/nsd_pkgs $< - -$(VNFD_BUILD_DIR)/ims_allin1_2p_vnf/charms/clearwater-aio-proxy: $(VNFD_BUILD_DIR)/ims_allin1_2p_vnf $(BUILD_DIR)/clearwater-juju - # Copy the IMS Charm into the IMS vnf package directory before packaging - cp -rf $(BUILD_DIR)/clearwater-juju/charms/trusty/clearwater-aio-proxy $(VNFD_BUILD_DIR)/ims_allin1_2p_vnf/charms - -$(VNFD_BUILD_DIR)/6wind_vnf/charms/vpe-router: $(VNFD_BUILD_DIR)/6wind_vnf $(BUILD_DIR)/juju-charms - # Copy the PE Charm into the PE vnf package directory before packaging - cp -rf $(BUILD_DIR)/juju-charms/builds/vpe-router $(VNFD_BUILD_DIR)/6wind_vnf/charms - -$(VNFD_BUILD_DIR)/VyOS_vnf/charms/vyos-proxy: $(VNFD_BUILD_DIR)/VyOS_vnf $(BUILD_DIR)/juju-charms - # Copy the PE Charm into the PE vnf package directory before packaging - cp -rf $(BUILD_DIR)/juju-charms/builds/vyos-proxy $(VNFD_BUILD_DIR)/VyOS_vnf/charms - -$(VNFD_BUILD_DIR)/ping_vnf/charms/pingpong: $(VNFD_BUILD_DIR)/ping_vnf $(BUILD_DIR)/juju-charms - # Copy the pingpong Charm into the ping vnf package directory before packaging - cp -rf $(BUILD_DIR)/juju-charms/builds/pingpong $(VNFD_BUILD_DIR)/ping_vnf/charms - -$(VNFD_BUILD_DIR)/pong_vnf/charms/pingpong: $(VNFD_BUILD_DIR)/pong_vnf $(BUILD_DIR)/juju-charms - # Copy the pingpong Charm into the pong vnf package directory before packaging - cp -rf $(BUILD_DIR)/juju-charms/builds/pingpong $(VNFD_BUILD_DIR)/pong_vnf/charms - -$(VNFD_BUILD_DIR)/knt_fnc_vnf/charms/flownac: $(VNFD_BUILD_DIR)/knt_fnc_vnf $(BUILD_DIR)/juju-charms - # Copy the FlowNAC Charm into the FNC vnf package directory before packaging - cp -rf $(BUILD_DIR)/juju-charms/builds/flownac $(VNFD_BUILD_DIR)/knt_fnc_vnf/charms - -$(VNFD_BUILD_DIR)/knt_fne_vnf/charms/flownac: $(VNFD_BUILD_DIR)/knt_fne_vnf $(BUILD_DIR)/juju-charms - # Copy the FlowNAC Charm into the FNE vnf package directory before packaging - cp -rf $(BUILD_DIR)/juju-charms/builds/flownac $(VNFD_BUILD_DIR)/knt_fne_vnf/charms - -$(VNFD_BUILD_DIR)/knt_fnd_vnf/charms/flownac: $(VNFD_BUILD_DIR)/knt_fnd_vnf $(BUILD_DIR)/juju-charms - # Copy the FlowNAC Charm into the FND vnf package directory before packaging - cp -rf $(BUILD_DIR)/juju-charms/builds/flownac $(VNFD_BUILD_DIR)/knt_fnd_vnf/charms -$(VNFD_BUILD_DIR)/knt_fnu_vnf/charms/flownac: $(VNFD_BUILD_DIR)/knt_fnu_vnf $(BUILD_DIR)/juju-charms - # Copy the FlowNAC Charm into the FNU vnf package directory before packaging - cp -rf $(BUILD_DIR)/juju-charms/builds/flownac $(VNFD_BUILD_DIR)/knt_fnu_vnf/charms +SUBDIRS = vnfd nsd -$(BUILD_DIR)/vnfd_pkgs/%.tar.gz: $(VNFD_BUILD_DIR)/% $(VNFD_BUILD_DIR)/ims_allin1_2p_vnf/charms/clearwater-aio-proxy $(VNFD_BUILD_DIR)/6wind_vnf/charms/vpe-router $(VNFD_BUILD_DIR)/VyOS_vnf/charms/vyos-proxy $(VNFD_BUILD_DIR)/ping_vnf/charms/pingpong $(VNFD_BUILD_DIR)/pong_vnf/charms/pingpong $(VNFD_BUILD_DIR)/knt_fnc_vnf/charms/flownac $(VNFD_BUILD_DIR)/knt_fne_vnf/charms/flownac $(VNFD_BUILD_DIR)/knt_fnd_vnf/charms/flownac $(VNFD_BUILD_DIR)/knt_fnu_vnf/charms/flownac - src/generate_descriptor_pkg.sh -d $(BUILD_DIR)/vnfd_pkgs $< +include mk/dirs.mk diff --git a/descriptor-packages/mk/dirs.mk b/descriptor-packages/mk/dirs.mk new file mode 100644 index 00000000..85a05e52 --- /dev/null +++ b/descriptor-packages/mk/dirs.mk @@ -0,0 +1,29 @@ +# +# Copyright 2017 Sandvine +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +SUBDIRS_CLEAN = $(addsuffix .clean, $(SUBDIRS)) + +.PHONY: $(SUBDIRS) $(SUBDIRS_CLEAN) clean + +all: $(SUBDIRS) + +clean: $(SUBDIRS_CLEAN) + +$(SUBDIRS_CLEAN): %.clean: + @$(MAKE) --no-print-directory -C $* clean + +$(SUBDIRS): + @$(MAKE) --no-print-directory -C $@ diff --git a/descriptor-packages/mk/pkg.mk b/descriptor-packages/mk/pkg.mk new file mode 100644 index 00000000..350af35e --- /dev/null +++ b/descriptor-packages/mk/pkg.mk @@ -0,0 +1,68 @@ +# +# Copyright 2017 Sandvine +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +TOPDIR=$(shell readlink -f .|sed -e 's/\/descriptor-packages\/.*//') + +BUILD_DIR := build +TOOLS_DIR := $(TOPDIR)/descriptor-packages/tools +PKG_BASE_NAME := $(shell basename $(shell pwd)) +PKG_NAME := $(addsuffix .tar.gz, $(PKG_BASE_NAME)) + +CHARM_DIR := $(TOPDIR)/juju-charms +CHARM_SRC_DIR := $(CHARM_DIR)/layers +CHARM_DOCKER_TAG := charm-tools +CHARM_BUILD_DIR := $(CHARM_DIR)/builds + +Q=@ + +GEN_VNFD_PKG := $(TOOLS_DIR)/gen_vnfd_pkg.sh +GEN_NSD_PKG := $(TOOLS_DIR)/gen_nsd_pkg.sh +GEN_PKG := $(TOOLS_DIR)/generate_descriptor_pkg.sh +BUILD_VNFD := $(shell readlink -f .|sed -e 's/\/.*descriptor-packages//' | grep vnfd) + +DEP_FILES = $(wildcard src/*) + +ifdef BUILD_VNFD +$(BUILD_DIR)/$(PKG_BASE_NAME): src $(DEP_FILES) + $(Q)mkdir -p $@ + $(Q)cp -rf $/dev/null 2>&1" while true; do @@ -795,7 +795,12 @@ if [ $CREATE == false ]; then cd $BASE_DIR if [ $DRY_RUN == false ]; then - tar zcvf "$DEST_DIR/$PKG.tar.gz" "${PKG}" ${RM} + if [ $VERBOSE == true ]; then + tar zcvf "$DEST_DIR/$PKG.tar.gz" "${PKG}" ${RM} + else + #tar zcvf ${name}.tar.gz ${name} >/dev/null 2>&1 + tar zcvf "$DEST_DIR/$PKG.tar.gz" "${PKG}" ${RM} > /dev/null 2>&1 + fi if [ $? -ne 0 ]; then rc=$? echo "ERROR: creating archive for $PKG ($rc)" >&2 diff --git a/descriptor-packages/vnfd/Makefile b/descriptor-packages/vnfd/Makefile new file mode 100644 index 00000000..fdd20452 --- /dev/null +++ b/descriptor-packages/vnfd/Makefile @@ -0,0 +1,18 @@ +# +# Copyright 2017 Sandvine +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +SUBDIRS = $(wildcard */) +TOPDIR ?= ../ +include $(TOPDIR)/mk/dirs.mk diff --git a/descriptor-packages/vnfd/VyOS_vnf/Makefile b/descriptor-packages/vnfd/VyOS_vnf/Makefile new file mode 100644 index 00000000..a08d5882 --- /dev/null +++ b/descriptor-packages/vnfd/VyOS_vnf/Makefile @@ -0,0 +1,21 @@ +# +# Copyright 2017 Sandvine +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +DESCRIPTORS_TOPDIR ?= ../.. + +include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk + +all: $(BUILD_DIR)/$(PKG_NAME) diff --git a/descriptor-packages/src/vnfd/VyOS_vnf/VyOS__vnfd.yaml b/descriptor-packages/vnfd/VyOS_vnf/src/VyOS__vnfd.yaml similarity index 100% rename from descriptor-packages/src/vnfd/VyOS_vnf/VyOS__vnfd.yaml rename to descriptor-packages/vnfd/VyOS_vnf/src/VyOS__vnfd.yaml diff --git a/descriptor-packages/src/vnfd/VyOS_vnf/icons/osm_2x.png b/descriptor-packages/vnfd/VyOS_vnf/src/icons/osm_2x.png similarity index 100% rename from descriptor-packages/src/vnfd/VyOS_vnf/icons/osm_2x.png rename to descriptor-packages/vnfd/VyOS_vnf/src/icons/osm_2x.png diff --git a/descriptor-packages/vnfd/cirros_vnf/Makefile b/descriptor-packages/vnfd/cirros_vnf/Makefile new file mode 100644 index 00000000..ad4b68cb --- /dev/null +++ b/descriptor-packages/vnfd/cirros_vnf/Makefile @@ -0,0 +1,19 @@ +# +# Copyright 2017 Sandvine +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +DESCRIPTORS_TOPDIR ?= ../.. +include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk + +all: $(BUILD_DIR)/$(PKG_NAME) diff --git a/descriptor-packages/src/vnfd/cirros_vnf/cirros_vnfd.yaml b/descriptor-packages/vnfd/cirros_vnf/src/cirros_vnfd.yaml similarity index 100% rename from descriptor-packages/src/vnfd/cirros_vnf/cirros_vnfd.yaml rename to descriptor-packages/vnfd/cirros_vnf/src/cirros_vnfd.yaml diff --git a/descriptor-packages/src/vnfd/cirros_vnf/icons/cirros-64.png b/descriptor-packages/vnfd/cirros_vnf/src/icons/cirros-64.png similarity index 100% rename from descriptor-packages/src/vnfd/cirros_vnf/icons/cirros-64.png rename to descriptor-packages/vnfd/cirros_vnf/src/icons/cirros-64.png diff --git a/descriptor-packages/vnfd/ims_allin1_2p_vnf/Makefile b/descriptor-packages/vnfd/ims_allin1_2p_vnf/Makefile new file mode 100644 index 00000000..52d95b56 --- /dev/null +++ b/descriptor-packages/vnfd/ims_allin1_2p_vnf/Makefile @@ -0,0 +1,20 @@ +# +# Copyright 2017 Sandvine +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +DESCRIPTORS_TOPDIR ?= ../.. + +include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk + +all: $(BUILD_DIR)/$(PKG_NAME) diff --git a/descriptor-packages/src/vnfd/ims_allin1_2p_vnf/IMS-ALLIN1__vnfd.yaml b/descriptor-packages/vnfd/ims_allin1_2p_vnf/src/IMS-ALLIN1__vnfd.yaml similarity index 100% rename from descriptor-packages/src/vnfd/ims_allin1_2p_vnf/IMS-ALLIN1__vnfd.yaml rename to descriptor-packages/vnfd/ims_allin1_2p_vnf/src/IMS-ALLIN1__vnfd.yaml diff --git a/descriptor-packages/src/vnfd/ims_allin1_2p_vnf/icons/metaswitch_2x.png b/descriptor-packages/vnfd/ims_allin1_2p_vnf/src/icons/metaswitch_2x.png similarity index 100% rename from descriptor-packages/src/vnfd/ims_allin1_2p_vnf/icons/metaswitch_2x.png rename to descriptor-packages/vnfd/ims_allin1_2p_vnf/src/icons/metaswitch_2x.png diff --git a/descriptor-packages/vnfd/ping_vnf/Makefile b/descriptor-packages/vnfd/ping_vnf/Makefile new file mode 100644 index 00000000..8c50a0a1 --- /dev/null +++ b/descriptor-packages/vnfd/ping_vnf/Makefile @@ -0,0 +1,21 @@ +# +# Copyright 2017 Sandvine +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +DESCRIPTORS_TOPDIR ?= ../.. + +VNFD_CHARM = pingpong +include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk + +all: $(BUILD_DIR)/$(PKG_NAME) diff --git a/descriptor-packages/src/vnfd/ping_vnf/cloud_init/ping_cloud_init.cfg b/descriptor-packages/vnfd/ping_vnf/src/cloud_init/ping_cloud_init.cfg similarity index 100% rename from descriptor-packages/src/vnfd/ping_vnf/cloud_init/ping_cloud_init.cfg rename to descriptor-packages/vnfd/ping_vnf/src/cloud_init/ping_cloud_init.cfg diff --git a/descriptor-packages/src/vnfd/ping_vnf/icons/rift_logo.png b/descriptor-packages/vnfd/ping_vnf/src/icons/rift_logo.png similarity index 100% rename from descriptor-packages/src/vnfd/ping_vnf/icons/rift_logo.png rename to descriptor-packages/vnfd/ping_vnf/src/icons/rift_logo.png diff --git a/descriptor-packages/src/vnfd/ping_vnf/ping_vnfd.yaml b/descriptor-packages/vnfd/ping_vnf/src/ping_vnfd.yaml similarity index 100% rename from descriptor-packages/src/vnfd/ping_vnf/ping_vnfd.yaml rename to descriptor-packages/vnfd/ping_vnf/src/ping_vnfd.yaml diff --git a/descriptor-packages/vnfd/pong_vnf/Makefile b/descriptor-packages/vnfd/pong_vnf/Makefile new file mode 100644 index 00000000..8c50a0a1 --- /dev/null +++ b/descriptor-packages/vnfd/pong_vnf/Makefile @@ -0,0 +1,21 @@ +# +# Copyright 2017 Sandvine +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +DESCRIPTORS_TOPDIR ?= ../.. + +VNFD_CHARM = pingpong +include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk + +all: $(BUILD_DIR)/$(PKG_NAME) diff --git a/descriptor-packages/src/vnfd/pong_vnf/cloud_init/pong_cloud_init.cfg b/descriptor-packages/vnfd/pong_vnf/src/cloud_init/pong_cloud_init.cfg similarity index 100% rename from descriptor-packages/src/vnfd/pong_vnf/cloud_init/pong_cloud_init.cfg rename to descriptor-packages/vnfd/pong_vnf/src/cloud_init/pong_cloud_init.cfg diff --git a/descriptor-packages/src/vnfd/pong_vnf/icons/rift_logo.png b/descriptor-packages/vnfd/pong_vnf/src/icons/rift_logo.png similarity index 100% rename from descriptor-packages/src/vnfd/pong_vnf/icons/rift_logo.png rename to descriptor-packages/vnfd/pong_vnf/src/icons/rift_logo.png diff --git a/descriptor-packages/src/vnfd/pong_vnf/pong_vnfd.yaml b/descriptor-packages/vnfd/pong_vnf/src/pong_vnfd.yaml similarity index 100% rename from descriptor-packages/src/vnfd/pong_vnf/pong_vnfd.yaml rename to descriptor-packages/vnfd/pong_vnf/src/pong_vnfd.yaml diff --git a/descriptor-packages/vnfd/ref11_vnf/Makefile b/descriptor-packages/vnfd/ref11_vnf/Makefile new file mode 100644 index 00000000..52d95b56 --- /dev/null +++ b/descriptor-packages/vnfd/ref11_vnf/Makefile @@ -0,0 +1,20 @@ +# +# Copyright 2017 Sandvine +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +DESCRIPTORS_TOPDIR ?= ../.. + +include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk + +all: $(BUILD_DIR)/$(PKG_NAME) diff --git a/descriptor-packages/src/vnfd/ref11_vnf/ref11_vnfd.yaml b/descriptor-packages/vnfd/ref11_vnf/src/ref11_vnfd.yaml similarity index 100% rename from descriptor-packages/src/vnfd/ref11_vnf/ref11_vnfd.yaml rename to descriptor-packages/vnfd/ref11_vnf/src/ref11_vnfd.yaml diff --git a/descriptor-packages/vnfd/ref12_vnf/Makefile b/descriptor-packages/vnfd/ref12_vnf/Makefile new file mode 100644 index 00000000..52d95b56 --- /dev/null +++ b/descriptor-packages/vnfd/ref12_vnf/Makefile @@ -0,0 +1,20 @@ +# +# Copyright 2017 Sandvine +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +DESCRIPTORS_TOPDIR ?= ../.. + +include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk + +all: $(BUILD_DIR)/$(PKG_NAME) diff --git a/descriptor-packages/src/vnfd/ref12_vnf/ref12_vnfd.yaml b/descriptor-packages/vnfd/ref12_vnf/src/ref12_vnfd.yaml similarity index 100% rename from descriptor-packages/src/vnfd/ref12_vnf/ref12_vnfd.yaml rename to descriptor-packages/vnfd/ref12_vnf/src/ref12_vnfd.yaml diff --git a/descriptor-packages/vnfd/ref21_vnf/Makefile b/descriptor-packages/vnfd/ref21_vnf/Makefile new file mode 100644 index 00000000..a08d5882 --- /dev/null +++ b/descriptor-packages/vnfd/ref21_vnf/Makefile @@ -0,0 +1,21 @@ +# +# Copyright 2017 Sandvine +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +DESCRIPTORS_TOPDIR ?= ../.. + +include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk + +all: $(BUILD_DIR)/$(PKG_NAME) diff --git a/descriptor-packages/src/vnfd/ref21_vnf/ref21_vnfd.yaml b/descriptor-packages/vnfd/ref21_vnf/src/ref21_vnfd.yaml similarity index 100% rename from descriptor-packages/src/vnfd/ref21_vnf/ref21_vnfd.yaml rename to descriptor-packages/vnfd/ref21_vnf/src/ref21_vnfd.yaml diff --git a/descriptor-packages/vnfd/ref22_vnf/Makefile b/descriptor-packages/vnfd/ref22_vnf/Makefile new file mode 100644 index 00000000..a08d5882 --- /dev/null +++ b/descriptor-packages/vnfd/ref22_vnf/Makefile @@ -0,0 +1,21 @@ +# +# Copyright 2017 Sandvine +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +DESCRIPTORS_TOPDIR ?= ../.. + +include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk + +all: $(BUILD_DIR)/$(PKG_NAME) diff --git a/descriptor-packages/src/vnfd/ref22_vnf/ref22_vnfd.yaml b/descriptor-packages/vnfd/ref22_vnf/src/ref22_vnfd.yaml similarity index 100% rename from descriptor-packages/src/vnfd/ref22_vnf/ref22_vnfd.yaml rename to descriptor-packages/vnfd/ref22_vnf/src/ref22_vnfd.yaml diff --git a/descriptor-packages/vnfd/ubuntu_cirros_multidisk_vnf/Makefile b/descriptor-packages/vnfd/ubuntu_cirros_multidisk_vnf/Makefile new file mode 100644 index 00000000..a08d5882 --- /dev/null +++ b/descriptor-packages/vnfd/ubuntu_cirros_multidisk_vnf/Makefile @@ -0,0 +1,21 @@ +# +# Copyright 2017 Sandvine +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +DESCRIPTORS_TOPDIR ?= ../.. + +include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk + +all: $(BUILD_DIR)/$(PKG_NAME) diff --git a/descriptor-packages/src/vnfd/ubuntu_cirros_multidisk_vnf/cloud_init/cloud_init.cfg b/descriptor-packages/vnfd/ubuntu_cirros_multidisk_vnf/src/cloud_init/cloud_init.cfg similarity index 100% rename from descriptor-packages/src/vnfd/ubuntu_cirros_multidisk_vnf/cloud_init/cloud_init.cfg rename to descriptor-packages/vnfd/ubuntu_cirros_multidisk_vnf/src/cloud_init/cloud_init.cfg diff --git a/descriptor-packages/src/vnfd/ubuntu_cirros_multidisk_vnf/ubuntu_cirros_multidisk_vnfd.yaml b/descriptor-packages/vnfd/ubuntu_cirros_multidisk_vnf/src/ubuntu_cirros_multidisk_vnfd.yaml similarity index 100% rename from descriptor-packages/src/vnfd/ubuntu_cirros_multidisk_vnf/ubuntu_cirros_multidisk_vnfd.yaml rename to descriptor-packages/vnfd/ubuntu_cirros_multidisk_vnf/src/ubuntu_cirros_multidisk_vnfd.yaml diff --git a/descriptor-packages/vnfd/ubuntu_xenial_vnf/Makefile b/descriptor-packages/vnfd/ubuntu_xenial_vnf/Makefile new file mode 100644 index 00000000..a08d5882 --- /dev/null +++ b/descriptor-packages/vnfd/ubuntu_xenial_vnf/Makefile @@ -0,0 +1,21 @@ +# +# Copyright 2017 Sandvine +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +DESCRIPTORS_TOPDIR ?= ../.. + +include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk + +all: $(BUILD_DIR)/$(PKG_NAME) diff --git a/descriptor-packages/src/vnfd/ubuntu_xenial_vnf/cloud_init/cloud_init.cfg b/descriptor-packages/vnfd/ubuntu_xenial_vnf/src/cloud_init/cloud_init.cfg similarity index 100% rename from descriptor-packages/src/vnfd/ubuntu_xenial_vnf/cloud_init/cloud_init.cfg rename to descriptor-packages/vnfd/ubuntu_xenial_vnf/src/cloud_init/cloud_init.cfg diff --git a/descriptor-packages/src/vnfd/ubuntu_xenial_vnf/icons/ubuntu-logo14.png b/descriptor-packages/vnfd/ubuntu_xenial_vnf/src/icons/ubuntu-logo14.png similarity index 100% rename from descriptor-packages/src/vnfd/ubuntu_xenial_vnf/icons/ubuntu-logo14.png rename to descriptor-packages/vnfd/ubuntu_xenial_vnf/src/icons/ubuntu-logo14.png diff --git a/descriptor-packages/src/vnfd/ubuntu_xenial_vnf/ubuntu_xenial_vnfd.yaml b/descriptor-packages/vnfd/ubuntu_xenial_vnf/src/ubuntu_xenial_vnfd.yaml similarity index 100% rename from descriptor-packages/src/vnfd/ubuntu_xenial_vnf/ubuntu_xenial_vnfd.yaml rename to descriptor-packages/vnfd/ubuntu_xenial_vnf/src/ubuntu_xenial_vnfd.yaml diff --git a/juju-charms/.gitignore b/juju-charms/.gitignore new file mode 100644 index 00000000..9f751ef9 --- /dev/null +++ b/juju-charms/.gitignore @@ -0,0 +1,2 @@ +deps/ +builds/ diff --git a/juju-charms/Dockerfile b/juju-charms/Dockerfile new file mode 100644 index 00000000..36248e2d --- /dev/null +++ b/juju-charms/Dockerfile @@ -0,0 +1,4 @@ +FROM ubuntu:16.04 + +RUN apt-get update && apt install -y charm-tools + diff --git a/juju-charms/Makefile b/juju-charms/Makefile index a579390f..76d21ac5 100644 --- a/juju-charms/Makefile +++ b/juju-charms/Makefile @@ -17,12 +17,13 @@ BUILD_DIR = . -CHARMS:= vpe-router vyos-proxy pingpong flownac sandvine-pts-proxy +CHARMS:= pingpong vyos-proxy netutils CHARM_SRC_DIR := layers CHARM_BUILD_DIR := $(BUILD_DIR)/builds CHARM_SRC_DIRS := $(addprefix $(CHARM_SRC_DIR)/, $(CHARMS)) CHARM_BUILD_DIRS := $(addprefix $(CHARM_BUILD_DIR)/, $(CHARMS)) +CHARM_DOCKER_TAG := charm-tools all: $(CHARM_BUILD_DIRS) @@ -30,4 +31,5 @@ clean: -@ $(RM) -rf $(CHARM_BUILD_DIR) $(CHARM_BUILD_DIR)/%: $(CHARM_SRC_DIR)/% - charm-build -o $(BUILD_DIR) $< + docker build -t $(CHARM_DOCKER_TAG) . + docker run -u $$(id -u):$$(id -g) -v$$(pwd):$$(pwd) -w$$(pwd) $(CHARM_DOCKER_TAG) charm-build -o $(BUILD_DIR) $< -- 2.25.1