aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/build-aarch64.yaml22
-rw-r--r--build/build.yaml21
-rw-r--r--build/parser.py72
3 files changed, 70 insertions, 45 deletions
diff --git a/build/build-aarch64.yaml b/build/build-aarch64.yaml
index 84352284..72d376e6 100644
--- a/build/build-aarch64.yaml
+++ b/build/build-aarch64.yaml
@@ -1,36 +1,42 @@
---
packages:
- - name: CentOS-7-aarch64-Minimal-1611.iso
+ - name: CentOS-7-aarch64-Minimal-1708.iso
description: "Centos ISO of each host for provisioning"
get_method: cached
- url: $COMPASS_ISO_REPO/CentOS-7-aarch64-Minimal-1611.iso
+ url: http://artifacts.opnfv.org/compass4nfv/package/master/CentOS-7-aarch64-Minimal-1708.iso
- name: ubuntu-16.04-server-arm64.iso
description: "Ubuntu ISO of each host for provisioning"
get_method: cached
- url: $COMPASS_ISO_REPO/ubuntu-16.04-server-arm64.iso
+ url: http://artifacts.opnfv.org/compass4nfv/package/master/ubuntu-16.04-server-arm64.iso
+
+ # XXX: For now, it's only an empty file to satisfy build.sh
+ - name: harbor-empty.tgz
+ description: "The package of harbor offline installer"
+ get_method: cached
+ url: http://people.linaro.org/~yibo.cai/compass/harbor-empty.tgz
- name: compass-deck
description: "RESTful API and DB Handlers for Compass"
get_method: docker
- url: linaro/compass-deck:latest
+ url: opnfv/compass-deck:latest
- name: compass-tasks-k8s
description: "compass task container for kubernets deployment via kargo"
get_method: docker
- url: linaro/compass-tasks-k8s:latest
+ url: opnfv/compass-tasks-k8s:latest
- name: compass-cobbler
description: "cobbler container for compass"
get_method: docker
- url: linaro/compass-cobbler:latest
+ url: opnfv/compass-cobbler:latest
- name: compass-db
description: "datebase container for compass"
get_method: docker
- url: linaro/compass-db:latest
+ url: opnfv/compass-db:latest
- name: compass-mq
description: "message queue container for compass"
get_method: docker
- url: linaro/compass-mq:latest
+ url: rabbitmq:3.6.12
diff --git a/build/build.yaml b/build/build.yaml
index 4f70f397..75faa280 100644
--- a/build/build.yaml
+++ b/build/build.yaml
@@ -3,12 +3,23 @@ packages:
- name: CentOS-7-x86_64-Minimal-1708.iso
description: "Centos ISO of each host for provisioning"
get_method: cached
- url: http://artifacts.opnfv.org/compass4nfv/package/master/CentOS-7-x86_64-Minimal-1708.iso
+ url:
+ - http://192.168.137.222/download/CentOS-7-x86_64-Minimal-1708.iso
+ - http://artifacts.opnfv.org/compass4nfv/package/master/CentOS-7-x86_64-Minimal-1708.iso
- name: ubuntu-16.04.3-server-amd64.iso
description: "Ubuntu ISO of each host for provisioning"
get_method: cached
- url: http://artifacts.opnfv.org/compass4nfv/package/master/ubuntu-16.04.3-server-amd64.iso
+ url:
+ - http://192.168.137.222/download/ubuntu-16.04.3-server-amd64.iso
+ - http://artifacts.opnfv.org/compass4nfv/package/master/ubuntu-16.04.3-server-amd64.iso
+
+ - name: harbor-offline-installer-v1.5.0.tgz
+ description: "The package of harbor v1.5.0"
+ get_method: cached
+ url:
+ - http://192.168.137.222/download/harbor-offline-installer-v1.5.0.tgz
+ - http://artifacts.opnfv.org/compass4nfv/package/master/harbor-offline-installer-v1.5.0.tgz
- name: compass-deck
description: "RESTful API and DB Handlers for Compass"
@@ -18,12 +29,12 @@ packages:
- name: compass-tasks-osa
description: "compass task container integrated with openstack-ansible"
get_method: docker
- url: huangxiangyu/compass-tasks-osa:latest
+ url: opnfv/compass-tasks-osa:latest
- name: compass-tasks-k8s
description: "compass task container integrated with kubespray"
get_method: docker
- url: compass4nfv/compass-tasks-k8s:latest
+ url: huxinhui/compass-tasks-k8s:7.0.1
- name: compass-cobbler
description: "cobbler container for compass"
@@ -43,7 +54,7 @@ packages:
- name: yardstick
description: "yardstick container for compass"
get_method: docker
- url: opnfv/yardstick:latest
+ url: opnfv/yardstick:stable
- name: compass-repo-osa-ubuntu
description: "compass repo container for deployment"
diff --git a/build/parser.py b/build/parser.py
index b80709cb..971d2844 100644
--- a/build/parser.py
+++ b/build/parser.py
@@ -18,65 +18,73 @@ def load_env():
return cache_dir
+def exec_command(cmd, ignore_error=False):
+ rc = os.system(cmd)
+ if not ignore_error and rc != 0:
+ sys.exit(1)
+ else:
+ return rc
+
+
def get_from_cache(cache, package):
filename = package.get("name")
- remotefile = package.get("url")
+ remotefile = list(package.get("url"))
localfile = cache + "/" + filename
localmd5file = localfile + ".md5"
- remotemd5file = remotefile + ".md5"
print "removing local md5 file...."
cmd = "rm -f " + localmd5file
- os.system(cmd)
+ exec_command(cmd)
print "downloading remote md5 file to local...."
- cmd = "curl --connect-timeout 10 -o " + localmd5file + " " + remotemd5file
- os.system(cmd)
- if os.path.exists(localmd5file):
- print "calculate md5sum of local file"
- cmd = "md5sum " + localfile + "|cut -d ' ' -f 1"
- localmd5sum = os.popen(cmd).readlines()
- cmd = "cat " + localmd5file + "|cut -d ' ' -f 1"
- remotemd5sum = os.popen(cmd).readlines()
- print "md5 local %s remote %s" % (localmd5sum, remotemd5sum)
- if (remotemd5sum == localmd5sum):
- print "Same with remote, no need to download...."
- return
+ for file in remotefile:
+ remotemd5file = file + ".md5"
+ cmd = "curl --connect-timeout 10 -o {0} {1}".format(
+ localmd5file, remotemd5file)
+ rc = exec_command(cmd, True)
+ if os.path.exists(localfile):
+ print "calculate md5sum of local file"
+ cmd = "md5sum " + localfile + "|cut -d ' ' -f 1"
+ localmd5sum = os.popen(cmd).readlines()
+ cmd = "cat " + localmd5file + "|cut -d ' ' -f 1"
+ remotemd5sum = os.popen(cmd).readlines()
+ print "md5 local %s remote %s" % (localmd5sum, remotemd5sum)
+ if (remotemd5sum == localmd5sum):
+ print "Same with remote, no need to download...."
+ return
+ if rc == 0:
+ break
print "downloading remote file to local...."
- cmd = "curl --connect-timeout 10 -o " + localfile + " " + remotefile
+ cmd = "aria2c --max-tries 1 --max-connection-per-server=4 \
+ --allow-overwrite=true --dir={0} --out={1} {2}".format(
+ cache, filename, " ".join(remotefile))
print cmd
- rc = os.system(cmd)
- if rc != 0:
- sys.exit(1)
+ exec_command(cmd)
def get_from_git(cache, package):
localfile = cache + "/" + package.get("name")
cmd = "rm -rf " + localfile
print cmd
- os.system(cmd)
+ exec_command(cmd)
cmd = "git clone " + package.get("url") + " " + localfile
print cmd
- rc = os.system(cmd)
- if rc != 0:
- sys.exit(1)
+ exec_command(cmd)
def get_from_docker(cache, package):
+ package_ouput = cache+"/"+package.get("name")+".tar"
cmd = "sudo docker pull "+package.get("url")
- os.system(cmd)
- cmd = "sudo docker save "+package.get("url")+" -o "+cache+"/"
- cmd += package.get("name")+".tar"
- rc = os.system(cmd)
- if rc != 0:
- sys.exit(1)
+ exec_command(cmd)
+ cmd = "sudo docker save "+package.get("url")+" -o "+package_ouput
+ exec_command(cmd)
+ cmd = "user=$(whoami); sudo chown -R $user:$user "+package_ouput
+ exec_command(cmd)
def get_from_curl(cache, package):
cmd = "curl --connect-timeout 10 -o " + cache + "/"
cmd += package.get("name") + " " + package.get("url")
print cmd
- rc = os.system(cmd)
- if rc != 0:
- sys.exit(1)
+ exec_command(cmd)
def usage():