From Fedora Project Wiki
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
*# https://review.openstack.org/#/c/447739/ needs updating | *# https://review.openstack.org/#/c/447739/ needs updating | ||
*# https://git.openstack.org/cgit/openstack/diskimage-builder/tree/diskimage_builder/elements/centos7/root.d/10-centos7-cloud-image#n19 | *# https://git.openstack.org/cgit/openstack/diskimage-builder/tree/diskimage_builder/elements/centos7/root.d/10-centos7-cloud-image#n19 | ||
<pre> | |||
diff --git a/diskimage_builder/elements/rpm-distro/pre-install.d/01-override-yum-arch b/diskimage_builder/elements/rpm-distro/pre-install.d/01-override-yum-arch | |||
index c61114e..8e3fe59 100755 | |||
--- a/diskimage_builder/elements/rpm-distro/pre-install.d/01-override-yum-arch | |||
+++ b/diskimage_builder/elements/rpm-distro/pre-install.d/01-override-yum-arch | |||
@@ -18,6 +18,9 @@ elif [[ "$ARCH" = "ppc64" ]]; then | |||
elif [[ "$ARCH" = "ppc64el" ]]; then | |||
basearch=ppc64el | |||
arch=ppc64el | |||
+elif [[ "$ARCH" = "ppc64le" ]]; then | |||
+ basearch=ppc64le | |||
+ arch=ppc64le | |||
elif [[ "arm64 aarch64" =~ "$ARCH" ]]; then | |||
basearch=aarch64 | |||
arch=aarch64 | |||
</pre> | |||
*# https://git.openstack.org/cgit/openstack/diskimage-builder/tree/diskimage_builder/elements/rpm-distro/pre-install.d/01-override-yum-arch#n25 | *# https://git.openstack.org/cgit/openstack/diskimage-builder/tree/diskimage_builder/elements/rpm-distro/pre-install.d/01-override-yum-arch#n25 | ||
<pre> | |||
diff --git a/diskimage_builder/elements/centos7/root.d/10-centos7-cloud-image b/diskimage_builder/elements/centos7/root.d/10-centos7-cloud-image | |||
index 73a41b9..42e534a 100755 | |||
--- a/diskimage_builder/elements/centos7/root.d/10-centos7-cloud-image | |||
+++ b/diskimage_builder/elements/centos7/root.d/10-centos7-cloud-image | |||
@@ -11,12 +11,20 @@ set -o pipefail | |||
if [[ "amd64 x86_64" =~ "$ARCH" ]]; then | |||
ARCH="x86_64" | |||
+ DIB_RELEASE=${DIB_RELEASE:-GenericCloud} | |||
DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-http://cloud.centos.org/centos/7/images} | |||
+ BASE_IMAGE_FILE=${BASE_IMAGE_FILE:-CentOS-7-${ARCH}-$DIB_RELEASE.qcow2.xz} | |||
elif [[ "arm64 aarch64" =~ "$ARCH" ]]; then | |||
ARCH="aarch64" | |||
DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-http://cloud.centos.org/altarch/7/images/aarch64} | |||
+ DIB_RELEASE=${DIB_RELEASE:-GenericCloud} | |||
+ BASE_IMAGE_FILE=${BASE_IMAGE_FILE:-CentOS-7-${ARCH}-$DIB_RELEASE.qcow2.xz} | |||
+elif [[ "ppc64le" =~ "$ARCH" ]]; then | |||
+ DIB_RELEASE=GenericCloud-1611 | |||
+ DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-http://ftp.unicamp.br/pub/ppc64el/centos/7/images} | |||
+ BASE_IMAGE_FILE=${BASE_IMAGE_FILE:-CentOS-7-${ARCH}-$DIB_RELEASE.qcow2} | |||
else | |||
- echo 'centos7 root element only support the x86_64 and aarch64 $ARCH value.' | |||
+ echo 'centos7 root element only support the amd64, x86_64, aarch64, and ppc64le $ARCH value.' | |||
exit 1 | |||
fi | |||
@@ -30,9 +38,7 @@ if [ -n "$DIB_LOCAL_IMAGE" ]; then | |||
BASE_IMAGE_FILE=$(basename $DIB_LOCAL_IMAGE) | |||
BASE_IMAGE_TAR=$BASE_IMAGE_FILE.tgz | |||
else | |||
- DIB_RELEASE=${DIB_RELEASE:-GenericCloud} | |||
DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES} | |||
- BASE_IMAGE_FILE=${BASE_IMAGE_FILE:-CentOS-7-${ARCH}-$DIB_RELEASE.qcow2.xz} | |||
BASE_IMAGE_TAR=$BASE_IMAGE_FILE.tgz | |||
IMAGE_LOCATION=$DIB_CLOUD_IMAGES/$BASE_IMAGE_FILE | |||
CACHED_IMAGE=$DIB_IMAGE_CACHE/$BASE_IMAGE_FILE | |||
</pre> | |||
* compile for ppc64le https://cloud.centos.org/altarch/7/images/ | * compile for ppc64le https://cloud.centos.org/altarch/7/images/ |
Revision as of 00:15, 19 June 2017
- diskimage-builder
diff --git a/diskimage_builder/elements/rpm-distro/pre-install.d/01-override-yum-arch b/diskimage_builder/elements/rpm-distro/pre-install.d/01-override-yum-arch index c61114e..8e3fe59 100755 --- a/diskimage_builder/elements/rpm-distro/pre-install.d/01-override-yum-arch +++ b/diskimage_builder/elements/rpm-distro/pre-install.d/01-override-yum-arch @@ -18,6 +18,9 @@ elif [[ "$ARCH" = "ppc64" ]]; then elif [[ "$ARCH" = "ppc64el" ]]; then basearch=ppc64el arch=ppc64el +elif [[ "$ARCH" = "ppc64le" ]]; then + basearch=ppc64le + arch=ppc64le elif [[ "arm64 aarch64" =~ "$ARCH" ]]; then basearch=aarch64 arch=aarch64
diff --git a/diskimage_builder/elements/centos7/root.d/10-centos7-cloud-image b/diskimage_builder/elements/centos7/root.d/10-centos7-cloud-image index 73a41b9..42e534a 100755 --- a/diskimage_builder/elements/centos7/root.d/10-centos7-cloud-image +++ b/diskimage_builder/elements/centos7/root.d/10-centos7-cloud-image @@ -11,12 +11,20 @@ set -o pipefail if [[ "amd64 x86_64" =~ "$ARCH" ]]; then ARCH="x86_64" + DIB_RELEASE=${DIB_RELEASE:-GenericCloud} DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-http://cloud.centos.org/centos/7/images} + BASE_IMAGE_FILE=${BASE_IMAGE_FILE:-CentOS-7-${ARCH}-$DIB_RELEASE.qcow2.xz} elif [[ "arm64 aarch64" =~ "$ARCH" ]]; then ARCH="aarch64" DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-http://cloud.centos.org/altarch/7/images/aarch64} + DIB_RELEASE=${DIB_RELEASE:-GenericCloud} + BASE_IMAGE_FILE=${BASE_IMAGE_FILE:-CentOS-7-${ARCH}-$DIB_RELEASE.qcow2.xz} +elif [[ "ppc64le" =~ "$ARCH" ]]; then + DIB_RELEASE=GenericCloud-1611 + DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-http://ftp.unicamp.br/pub/ppc64el/centos/7/images} + BASE_IMAGE_FILE=${BASE_IMAGE_FILE:-CentOS-7-${ARCH}-$DIB_RELEASE.qcow2} else - echo 'centos7 root element only support the x86_64 and aarch64 $ARCH value.' + echo 'centos7 root element only support the amd64, x86_64, aarch64, and ppc64le $ARCH value.' exit 1 fi @@ -30,9 +38,7 @@ if [ -n "$DIB_LOCAL_IMAGE" ]; then BASE_IMAGE_FILE=$(basename $DIB_LOCAL_IMAGE) BASE_IMAGE_TAR=$BASE_IMAGE_FILE.tgz else - DIB_RELEASE=${DIB_RELEASE:-GenericCloud} DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES} - BASE_IMAGE_FILE=${BASE_IMAGE_FILE:-CentOS-7-${ARCH}-$DIB_RELEASE.qcow2.xz} BASE_IMAGE_TAR=$BASE_IMAGE_FILE.tgz IMAGE_LOCATION=$DIB_CLOUD_IMAGES/$BASE_IMAGE_FILE CACHED_IMAGE=$DIB_IMAGE_CACHE/$BASE_IMAGE_FILE
- compile for ppc64le https://cloud.centos.org/altarch/7/images/
- compile for ppc64le https://trunk.rdoproject.org/centos7-master/current-passed-ci/ (delorean.repo)
- compile for ppc64le https://buildlogs.centos.org/centos/7/cloud/ppc64le/openstack-pike/ (delorean-deps.repo)
- openstack/python-tripleoclient
diff --git a/image/.build.py.swp b/image/.build.py.swp deleted file mode 100644 index 427d440..0000000 Binary files a/image/.build.py.swp and /dev/null differ diff --git a/image/base.py b/image/base.py index 67d97ac..59f7e5a 100644 --- a/image/base.py +++ b/image/base.py @@ -31,6 +31,8 @@ class BaseImageManager(object): ) def __init__(self, config_files, images=None): +# import pdb +# pdb.set_trace() self.config_files = config_files self.images = images @@ -47,6 +49,8 @@ class BaseImageManager(object): def load_config_files(self, section): config_data = {} for config_file in self.config_files: +# import pdb +# pdb.set_trace() if os.path.isfile(config_file): with open(config_file) as cf: data = yaml.safe_load(cf.read()).get(section) diff --git a/image/build.py b/image/build.py index 710f0f9..3df360a 100644 --- a/image/build.py +++ b/image/build.py @@ -35,10 +35,11 @@ class ImageBuildManager(BaseImageManager): APPEND_ATTRIBUTES = BaseImageManager.APPEND_ATTRIBUTES + ['environment'] def __init__(self, config_files, images=None, output_directory='.', - skip=False): + skip=False, arch='amd64'): super(ImageBuildManager, self).__init__(config_files, images) self.output_directory = re.sub('[/]$', '', output_directory) self.skip = skip + self.arch = arch def build(self): """Start the build process""" @@ -48,7 +49,9 @@ class ImageBuildManager(BaseImageManager): disk_images = self.load_config_files(self.DISK_IMAGES) for image in disk_images: - arch = image.get('arch', 'amd64') +# import pdb +# pdb.set_trace() + arch = image.get('arch', self.arch) image_type = image.get('type', 'qcow2') image_name = image.get('imagename') builder = image.get('builder', 'dib')
- openstack/tripleo-common
diff --git a/v1/.overcloud_image.py.swp b/v1/.overcloud_image.py.swp deleted file mode 100644 index 04ad0b5..0000000 Binary files a/v1/.overcloud_image.py.swp and /dev/null differ diff --git a/v1/overcloud_image.py b/v1/overcloud_image.py index 6783b4f..3e930aa 100644 --- a/v1/overcloud_image.py +++ b/v1/overcloud_image.py @@ -178,7 +178,14 @@ class BuildOvercloudImage(command.Command): log = logging.getLogger(__name__ + ".BuildOvercloudImage") IMAGE_YAML_PATH = "/usr/share/openstack-tripleo-common/image-yaml" - DEFAULT_YAML = ['overcloud-images.yaml', 'overcloud-images-centos7.yaml'] + DEFAULT_YAML_AMD64 = [ + 'overcloud-images.yaml', + 'overcloud-images-centos7.yaml' + ] + DEFAULT_YAML_PPC64LE = [ + 'overcloud-images-ppc64le.yaml', + 'overcloud-images-centos7-ppc64le.yaml' + ] # The constants below are deprecated and will be removed in Pike TRIPLEOPUPPETELEMENTS = "/usr/share/tripleo-puppet-elements" @@ -596,21 +603,26 @@ class BuildOvercloudImage(command.Command): def take_action(self, parsed_args): self.log.debug("take_action(%s)" % parsed_args) - import pdb - pdb.set_trace() +# import pdb +# pdb.set_trace() if parsed_args.all or parsed_args.image_types: return self._legacy_build(parsed_args) if not parsed_args.config_files: + default_yaml = self.DEFAULT_YAML_AMD64 + arch = parsed_args.node_arch + if arch == 'ppc64le': + default_yaml = self.DEFAULT_YAML_PPC64LE + parsed_args.config_files = [os.path.join(self.IMAGE_YAML_PATH, f) - for f in self.DEFAULT_YAML] + for f in default_yaml] manager = build.ImageBuildManager( parsed_args.config_files, output_directory=parsed_args.output_directory, skip=parsed_args.skip, images=parsed_args.image_names, - arch=parsed_args.arch) + arch=arch) manager.build()
- nodejs
- support ppc64le
... error: Architecture is not included: ppc64le ...
- python-fastcache
- Does not build locally via mockchain
[hamzy@pkvmci853 mockchain2]$ mockchain -r epel-7-ppc64le --tmp_prefix=mockbuild --localrepo=mock-repo ${ADDREPO} --log=mockchain.log --recurse python-fastcache-1.0.2-3.el7.src.rpm ... ============================= test session starts ============================== platform linux2 -- Python 2.7.5, pytest-3.0.6, py-1.4.31, pluggy-0.4.0 -- /usr/bin/python2 cachedir: .cache rootdir: /builddir/build/BUILD/python-fastcache-1.0.2/fastcache-1.0.2, inifile: collecting ... collected 0 items ========================= no tests ran in 0.01 seconds ========================= ...
- openstack-tripleo-ui-deps
- support ppc64le
... error: Architecture is not included: ppc64le ...
- x86_64 binaries embedded
- openstack-magnum
... 2017-06-18 14:30:17,030 INFO:dlrn-build:DEBUG: + /usr/bin/python2 setup.py test 2017-06-18 14:30:18,298 INFO:dlrn-build:DEBUG: running test Failed to import test module: magnum.tests.unit.common.test_docker_utils Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/unittest2/loader.py", line 445, in _find_test_path module = self._get_module_from_name(name) File "/usr/lib/python2.7/site-packages/unittest2/loader.py", line 384, in _get_module_from_name __import__(name)\n File "/builddir/build/BUILD/magnum-4.1.1.dev238/magnum/tests/unit/common/test_docker_utils.py", line 18, in <module> from magnum.common import docker_utils File "/builddir/build/BUILD/magnum-4.1.1.dev238/magnum/common/docker_utils.py", line 80, in <module> class DockerHTTPClient(docker.APIClient):\nAttributeError: \'module\' object has no attribute \'APIClient\' ...
Maybe this https://github.com/openstack/magnum/commit/1e0785c32089a229a65f0a3d469f899440d7af2a9