diff options
27 files changed, 199 insertions, 332 deletions
diff --git a/jjb/aaf/aaf-sms-csit.yaml b/jjb/aaf/aaf-sms-csit.yaml new file mode 100644 index 000000000..21581495c --- /dev/null +++ b/jjb/aaf/aaf-sms-csit.yaml @@ -0,0 +1,14 @@ +--- +- project: + name: aaf-sms-csit + jobs: + - '{project-name}-{stream}-verify-csit-{functionality}' + - '{project-name}-{stream}-csit-{functionality}' + project-name: 'aaf' + stream: 'master' + functionality: + - 'sms-test-plan': + trigger_jobs: + - 'aaf-sms-master-docker-golang-shell-daily' + robot-options: '' + branch: 'master' diff --git a/jjb/aai/aai-sparky-be.yaml b/jjb/aai/aai-sparky-be.yaml index 3a1f2e05b..42b16fc40 100644 --- a/jjb/aai/aai-sparky-be.yaml +++ b/jjb/aai/aai-sparky-be.yaml @@ -8,7 +8,7 @@ - '{project-name}-{stream}-merge-java' - '{project-name}-{stream}-release-version-java-daily' - '{project-name}-{stream}-aai-docker-java-daily': - pom: 'pom.xml' + pom: 'sparkybe-onap-application/pom.xml' mvn-goals: 'docker:build' project: 'aai/sparky-be' stream: diff --git a/jjb/ccsdk/dashboard.yaml b/jjb/ccsdk/dashboard.yaml deleted file mode 100644 index f28d88145..000000000 --- a/jjb/ccsdk/dashboard.yaml +++ /dev/null @@ -1,33 +0,0 @@ ---- -- project: - name: ccsdk-dashboard - project-name: 'ccsdk-dashboard' - jobs: - - gerrit-maven-clm: - - '{project-name}-{stream}-verify-java' - - '{project-name}-{stream}-merge-java' - - project: 'ccsdk/dashboard' - stream: - - 'master': - branch: 'master' - mvn-settings: 'ccsdk-dashboard-settings' - # due to a strange macro / variable translation problem this needs to be - # passed as a string block to properly get the properties correctly defined - # in the job - maven-deploy-properties: | - deployAtEnd=true - files: '**' - archive-artifacts: '' -- project: - name: ccsdk-dashboard-sonar - jobs: - - gerrit-maven-sonar - cron: 'H 11 * * *' - build-node: ubuntu1604-builder-4c-4g - project: 'ccsdk/dashboard' - project-name: 'ccsdk-dashboard' - branch: 'master' - mvn-settings: 'ccsdk-dashboard-settings' - mvn-goals: 'clean install' - mvn-opts: '-Xmx1024m -XX:MaxPermSize=256m' diff --git a/jjb/ccsdk/platform-nbapi.yaml b/jjb/ccsdk/platform-nbapi.yaml deleted file mode 100644 index 9075905bf..000000000 --- a/jjb/ccsdk/platform-nbapi.yaml +++ /dev/null @@ -1,34 +0,0 @@ ---- -- project: - name: ccsdk-platform-nbapi - project-name: 'ccsdk-platform-nbapi' - jobs: - - gerrit-maven-clm: - - '{project-name}-{stream}-verify-java' - - '{project-name}-{stream}-merge-java' - - '{project-name}-{stream}-release-version-java-daily' - - project: 'ccsdk/platform/nbapi' - stream: - - 'master': - branch: 'master' - mvn-settings: 'ccsdk-platform-nbapi-settings' - # due to a strange macro / variable translation problem this needs to be - # passed as a string block to properly get the properties correctly defined - # in the job - maven-deploy-properties: | - deployAtEnd=true - files: '**' - archive-artifacts: '' -- project: - name: ccsdk-platform-nbapi-sonar - jobs: - - gerrit-maven-sonar - cron: 'H 11 * * *' - build-node: ubuntu1604-builder-4c-4g - project: 'ccsdk/platform/nbapi' - project-name: 'ccsdk-platform-nbapi' - branch: 'master' - mvn-settings: 'ccsdk-platform-nbapi-settings' - mvn-goals: 'clean install' - mvn-opts: '-Xmx1024m -XX:MaxPermSize=256m' diff --git a/jjb/ci-management/ci-management-packer-jobs.yaml b/jjb/ci-management/ci-management-packer-jobs.yaml new file mode 100644 index 000000000..f78186112 --- /dev/null +++ b/jjb/ci-management/ci-management-packer-jobs.yaml @@ -0,0 +1,71 @@ +--- +- project: + name: packer-builder-jobs + jobs: + - gerrit-packer-merge + + project: ci-management + project-name: ci-management + branch: master + archive-artifacts: '**/*.log' + + build-node: centos7-builder-2c-1g + build-timeout: 90 + + platforms: + - centos-7 + - ubuntu-16.04 + templates: builder + +- project: + name: packer-docker-jobs + jobs: + - gerrit-packer-merge + + project: ci-management + project-name: ci-management + branch: master + archive-artifacts: '**/*.log' + + build-node: centos7-builder-2c-1g + build-timeout: 60 + + platforms: + - centos-7 + - ubuntu-16.04 + templates: docker + +- project: + name: packer-memcached-jobs + jobs: + - gerrit-packer-merge + + project: ci-management + project-name: ci-management + branch: master + archive-artifacts: '**/*.log' + + build-node: centos7-builder-2c-1g + build-timeout: 90 + + platforms: + - centos-7 + - ubuntu-16.04 + templates: memcached + +- project: + name: packer-redis-jobs + jobs: + - gerrit-packer-merge + + project: ci-management + project-name: ci-management + branch: master + archive-artifacts: '**/*.log' + + build-node: centos7-builder-2c-1g + + platforms: + - centos-7 + - ubuntu-16.04 + templates: redis diff --git a/jjb/ci-management/ci-management.yaml b/jjb/ci-management/ci-management.yaml index 16ae88bc1..6f2a3db8e 100644 --- a/jjb/ci-management/ci-management.yaml +++ b/jjb/ci-management/ci-management.yaml @@ -3,6 +3,7 @@ name: ci-management-jobs jobs: - '{project-name}-ci-jobs' + - gerrit-packer-verify project: 'ci-management' project-name: 'ci-management' @@ -12,29 +13,6 @@ build-node: 'centos7-builder-2c-1g' jjb-version: 2.0.0 -- project: - name: packer-jobs - # packer jobs templates are defined in global-jjb - jobs: - - '{project-name}-packer-jobs' - project: 'ci-management' - project-name: 'ci-management' - branch: master - archive-artifacts: '**/*.log' - build-node: 'ubuntu1604-builder-4c-4g' - platforms: - - centos - - ubuntu-16.04 - templates: - - builder - - docker - - memcached - - redis - exclude: - # only build the docker image on ubuntu at present - - platforms: centos - templates: docker - - job-template: name: '{project}-verify-jjb' diff --git a/jjb/dmaap/dmaap-datarouter.yaml b/jjb/externalapi/externalapi-nbi.yaml index d9548cf01..592a886ad 100644 --- a/jjb/dmaap/dmaap-datarouter.yaml +++ b/jjb/externalapi/externalapi-nbi.yaml @@ -1,27 +1,32 @@ --- - project: - name: dmaap-datarouter - project-name: 'dmaap-datarouter' + name: externalapi-nbi + project-name: 'externalapi-nbi' jobs: - gerrit-maven-clm - '{project-name}-{stream}-verify-java' - '{project-name}-{stream}-merge-java' - '{project-name}-{stream}-release-version-java-daily' - project: 'dmaap/datarouter' + - '{project-name}-{stream}-docker-version-java-daily': + docker-pom: 'pom.xml' + mvn-profile: 'docker' + project: 'externalapi/nbi' stream: - 'master': branch: 'master' - mvn-settings: 'dmaap-datarouter-settings' + mvn-settings: 'externalapi-nbi-settings' files: '**' archive-artifacts: '' + build-node: ubuntu1604-builder-4c-4g - project: - name: dmaap-datarouter-sonar + name: externalapi-nbi-sonar jobs: - gerrit-maven-sonar + cron: 'H 11 * * *' build-node: ubuntu1604-builder-4c-4g - project: 'dmaap/datarouter' - project-name: 'dmaap-datarouter' + project: 'externalapi/nbi' + project-name: 'externalapi-nbi' branch: 'master' - mvn-settings: 'dmaap-datarouter-settings' + mvn-settings: 'externalapi-nbi-settings' mvn-goals: 'clean install' mvn-opts: '-Xmx1024m -XX:MaxPermSize=256m' diff --git a/jjb/global-defaults.yaml b/jjb/global-defaults.yaml index 64f6a74eb..450355ff2 100644 --- a/jjb/global-defaults.yaml +++ b/jjb/global-defaults.yaml @@ -14,6 +14,9 @@ # lf-infra defaults lftools-version: <1.0.0 + # packer_version + packer-version: 1.1.3 + # default gerrit server definition server-name: 'Primary' gerrit-server-name: 'Primary' @@ -22,6 +25,7 @@ jdk: '' # Maven + mvn-params: '' onap-infra-mvn-opts: | --show-version --batch-mode diff --git a/jjb/global-jjb b/jjb/global-jjb -Subproject aa205517366205dd017d0801bd0cfe104e742c1 +Subproject 90e4e825b3d0ac5959122c50e457419ad0cfe13 diff --git a/jjb/global-macros.yaml b/jjb/global-macros.yaml index 6be0e0f94..27167b67e 100644 --- a/jjb/global-macros.yaml +++ b/jjb/global-macros.yaml @@ -123,6 +123,14 @@ description: 'Used by Heat to generate a unique stack & vm name' - parameter: + name: maven-params + parameters: + - string: + name: MAVEN_PARAMS + default: '{mvn-params}' + description: Maven parameters to pass to the mvn command. + +- parameter: name: maven-exec parameters: - string: diff --git a/jjb/global-templates-java.yaml b/jjb/global-templates-java.yaml index 210ed9b82..171fdb191 100644 --- a/jjb/global-templates-java.yaml +++ b/jjb/global-templates-java.yaml @@ -90,6 +90,8 @@ artifacts: '{archive-artifacts}' - maven-exec: maven-version: '{maven-version}' + - maven-params: + mvn-params: '{mvn-params}' scm: - gerrit-trigger-scm: @@ -115,7 +117,7 @@ - maven-target: maven-version: '{maven-version}' goals: 'clean install -B - -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn {mvn-params}' settings: '{mvn-settings}' settings-type: cfp global-settings: 'global-settings' diff --git a/jjb/modeling/modeling-toscaparsers-nfvparser.yaml b/jjb/modeling/modeling-toscaparsers-nfvparser.yaml index 5cdeea23d..c2a49e490 100644 --- a/jjb/modeling/modeling-toscaparsers-nfvparser.yaml +++ b/jjb/modeling/modeling-toscaparsers-nfvparser.yaml @@ -21,3 +21,17 @@ - '{project-name}-{stream}-{subproject}-verify-java' - '{project-name}-{stream}-{subproject}-merge-java' - '{project-name}-{stream}-{subproject}-release-version-java-daily' + +- project: + name: modeling-toscaparsers-nfvparser-sonar + jobs: + - gerrit-maven-sonar + cron: 'H 11 * * *' + build-node: ubuntu1604-builder-4c-4g + project: 'modeling/toscaparsers' + project-name: 'modeling-toscaparsers-nfvparser' + branch: 'master' + mvn-params: '-f nfvparser/pom.xml' + mvn-settings: 'modeling-toscaparsers-settings' + mvn-goals: 'clean install' + mvn-opts: '-Xmx1024m -XX:MaxPermSize=256m' diff --git a/jjb/vfc/vfc-nfvo-driver-vnfm-svnfm-root.yaml b/jjb/vfc/vfc-nfvo-driver-vnfm-svnfm-root.yaml new file mode 100644 index 000000000..5fbd144e5 --- /dev/null +++ b/jjb/vfc/vfc-nfvo-driver-vnfm-svnfm-root.yaml @@ -0,0 +1,21 @@ +--- +- project: + name: vfc-nfvo-driver-vnfm-svnfm-root + project-name: 'vfc-nfvo-driver-svnfm-root' + project: 'vfc/nfvo/driver/vnfm/svnfm' + stream: + - 'master': + branch: 'master' + mvn-settings: 'vfc-nfvo-driver-vnfm-svnfm-settings' + mvn-params: '-pl nokia,nokiav2,huawei,zte' + subproject: + - 'drv-vnfm-root': + pom: 'pom.xml' + pattern: 'pom.xml' + jobs: + - '{project-name}-{stream}-{subproject}-verify-java' + - '{project-name}-{stream}-{subproject}-merge-java' + - '{project-name}-{stream}-{subproject}-release-version-java-daily' + files: '**' + archive-artifacts: '' + build-node: ubuntu1604-builder-4c-4g diff --git a/jjb/vnfsdk/vnfsdk-dovetail-integration-python.yaml b/jjb/vnfsdk/vnfsdk-dovetail-integration-python.yaml index 17760b614..cee261684 100644 --- a/jjb/vnfsdk/vnfsdk-dovetail-integration-python.yaml +++ b/jjb/vnfsdk/vnfsdk-dovetail-integration-python.yaml @@ -21,6 +21,9 @@ - '{project-name}-{stream}-{subproject}-verify-python' - '{project-name}-{stream}-{subproject}-merge-java' - '{project-name}-{subproject}-python-staging-{stream}' + - '{project-name}-{stream}-docker-version-java-daily': + docker-pom: 'pom.xml' + mvn-profile: 'docker' - project: name: vnfsdk-dovetail-integration-sonar jobs: diff --git a/jjb/vnfsdk/vnfsdk-ves-agent.yaml b/jjb/vnfsdk/vnfsdk-ves-agent.yaml index 05fdcbd91..95f9b8a85 100644 --- a/jjb/vnfsdk/vnfsdk-ves-agent.yaml +++ b/jjb/vnfsdk/vnfsdk-ves-agent.yaml @@ -9,7 +9,8 @@ jobs: - gerrit-maven-clm: mvn-params: '-f veslibrary/ves_javalibrary/evel_javalib2/pom.xml' - - '{project-name}-{stream}-verify-java' + - '{project-name}-{stream}-verify-java': + mvn-params: '-f veslibrary/ves_javalibrary/evel_javalib2/pom.xml' - '{project-name}-{stream}-{subproject}-verify-java' - '{project-name}-{stream}-{subproject}-merge-java' - '{project-name}-{stream}-{subproject}-release-version-java-daily' diff --git a/packer/README.markdown b/packer/README.markdown index 4972affae..1ef176a62 100644 --- a/packer/README.markdown +++ b/packer/README.markdown @@ -12,10 +12,10 @@ You'll need to [install Packer][2], of course. Open-O's Packer configuration is divided into build-specific variables, output-specific templates and a set of shared provisioning scripts. To do a specific build, combine the template for the desired output artifact type with -a variable file. To build a new basebuild instance the following would be done: +a variable file. To build a new builder instance the following would be done: ``` -packer build -var-file=vars/cloud-env.json -var-file=vars/centos.json templates/basebuild.json +packer build -var-file=vars/cloud-env.json -var-file=vars/centos.json templates/builder.json ``` **NOTE:** vars/cloud-env.json is a gitignored file as it contains private diff --git a/packer/common-packer b/packer/common-packer -Subproject e3344fc74b1fc3e40cf8f4f7e713047373d9b17 +Subproject 1f561541e3c6a02263924e87b1e0d0bfeac2391 diff --git a/packer/provision/docker.sh b/packer/provision/docker.sh deleted file mode 100644 index 9d34eb079..000000000 --- a/packer/provision/docker.sh +++ /dev/null @@ -1,119 +0,0 @@ -#!/bin/bash - -# vim: ts=4 sw=4 sts=4 et tw=72 : - -# force any errors to cause the script and job to end in failure -set -xeu -o pipefail - -rh_systems() { - # Assumes that python is already installed by basebuild - - # Install dependencies for robotframework and robotframework-sshlibrary - yum install -y yum-utils unzip sshuttle nc libffi-devel openssl-devel - - # Install docker - yum install -y docker supervisor bridge-utils - systemctl enable docker - - # configure docker networking so that it does not conflict with LF - # internal networks - cat <<EOL > /etc/sysconfig/docker-network -# /etc/sysconfig/docker-network -DOCKER_NETWORK_OPTIONS='--bip=10.250.0.254/24' -EOL - # configure docker daemon to listen on port 5555 enabling remote - # managment - sed -i -e "s#='--selinux-enabled'#='--selinux-enabled -H unix:///var/run/docker.sock -H tcp://0.0.0.0:5555'#g" /etc/sysconfig/docker - - # docker group doesn't get created by default for some reason - groupadd docker -} - -ubuntu_docker_mtu_fix(){ - echo "---> Fixing docker's mtu settings" - systemctl stop docker - cat <<'EOL' > /etc/systemd/system/docker.service -[Unit] -Description=Docker Application Container Engine -Documentation=https://docs.docker.com -After=network.target docker.socket -Requires=docker.socket - -[Service] -Type=notify -# the default is not to use systemd for cgroups because the delegate issues still -# exists and systemd currently does not support the cgroup feature set required -# for containers run by docker -ExecStart= -ExecStart=/usr/bin/dockerd --mtu 1454 -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock -ExecReload=/bin/kill -s HUP $MAINPID -# Having non-zero Limit*s causes performance problems due to accounting overhead -# in the kernel. We recommend using cgroups to do container-local accounting. -LimitNOFILE=infinity -LimitNPROC=infinity -LimitCORE=infinity -# Uncomment TasksMax if your systemd version supports it. -# Only systemd 226 and above support this version. -TasksMax=infinity -TimeoutStartSec=0 -# set delegate yes so that systemd does not reset the cgroups of docker containers -Delegate=yes -# kill only the docker process, not all processes in the cgroup -KillMode=process - -[Install] -WantedBy=multi-user.target -EOL - systemctl start docker - echo "---> Checking MTU" - docker network inspect bridge - echo "---> MTU set to 1454" -} - -ubuntu_systems() { - # Assumes that python is already installed by basebuild - - # Install Python3.6 - sudo add-apt-repository -y ppa:jonathonf/python-3.6 - sudo apt-get update - sudo apt-get install -y python3.6 python3.6-dev - - # Install dependencies for robotframework and robotframework-sshlibrary - apt install -y unzip sshuttle netcat libffi-dev libssl-dev - wget https://github.com/mozilla/geckodriver/releases/download/v0.18.0/geckodriver-v0.18.0-linux64.tar.gz - tar xvzf geckodriver-v0.18.0-linux64.tar.gz -C /usr/local/bin - export PATH=$PATH:/usr/local/bin - - # Install docker - apt install -y docker.io - - # Fixing Docker MTU settings - ubuntu_docker_mtu_fix -} - -all_systems() { - # Install docker-compose - curl -o /usr/local/bin/docker-compose -L "https://github.com/docker/compose/releases/download/1.15.0/docker-compose-$(uname -s)-$(uname -m)" - chmod +x /usr/local/bin/docker-compose - docker-compose -v -} - -echo "---> Detecting OS" -ORIGIN=$(facter operatingsystem | tr '[:upper:]' '[:lower:]') - -case "${ORIGIN}" in - fedora|centos|redhat) - echo "---> RH type system detected" - rh_systems - ;; - ubuntu) - echo "---> Ubuntu system detected" - ubuntu_systems - ;; - *) - echo "---> Unknown operating system" - ;; -esac - -# execute steps for all systems -all_systems diff --git a/packer/provision/local-builder.yaml b/packer/provision/local-builder.yaml new file mode 100644 index 000000000..ddfe3a998 --- /dev/null +++ b/packer/provision/local-builder.yaml @@ -0,0 +1,2 @@ +--- +- import_playbook: ../common-packer/provision/baseline.yaml diff --git a/packer/provision/local-docker.yaml b/packer/provision/local-docker.yaml new file mode 100644 index 000000000..6de720cad --- /dev/null +++ b/packer/provision/local-docker.yaml @@ -0,0 +1,34 @@ +--- +- import_playbook: ../common-packer/provision/docker.yaml + +- hosts: all + become_user: root + become_method: sudo + vars: + docker_compose_version: 1.17.1 + glide_checksum: sha256:c403933503ea40308ecfadcff581ff0dc3190c57958808bb9eed016f13f6f32c + glide_version: v0.13.1 + golang_checksum: sha256:07d81c6b6b4c2dcf1b5ef7c27aaebd3691cdb40548500941f92b221147c5d9c7 + golang_version: 1.9.1 + + tasks: + - name: 'Install Docker Compose {{docker_compose_version}}' + command: curl -o /usr/local/bin/docker-compose -L "https://github.com/docker/compose/releases/download/{{docker_compose_version}}/docker-compose-$(uname -s)-$(uname -m)" + become: true + + - name: 'Install GoLang {{golang_version}}' + block: + - name: 'Fetch golang {{golang_version}} to /tmp/go{{golang_version}}.linux-amd64.tar.gz' + get_url: + url: 'https://storage.googleapis.com/golang/go{{golang_version}}.linux-amd64.tar.gz' + dest: '/tmp/go{{golang_version}}.linux-amd64.tar.gz' + checksum: '{{golang_checksum}}' + - name: 'Install golang {{golang_version}} to /usr/local' + unarchive: + src: '/tmp/go{{golang_version}}.linux-amd64.tar.gz' + dest: /usr/local + remote_src: true + become: true + - name: 'Add golang to PATH' + command: 'echo "export PATH=$PATH:/usr/local/go/bin" >> /etc/profile' + become: true diff --git a/packer/templates/basebuild.json b/packer/templates/basebuild.json deleted file mode 100644 index ff84a72d6..000000000 --- a/packer/templates/basebuild.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "variables": { - "stack_tenant": null, - "stack_user": null, - "stack_pass": null, - "stack_network": null, - "base_image": null, - "cloud_user": null, - "distro": null, - "cloud_user_data": null - }, - "builders": [ - { - "type": "openstack", - "identity_endpoint": "https://auth.vexxhost.net/v2.0/", - "tenant_name": "{{user `stack_tenant`}}", - "username": "{{user `stack_user`}}", - "password": "{{user `stack_pass`}}", - "region": "ca-ymq-1", - "ssh_username": "{{user `cloud_user`}}", - "image_name": "{{user `distro`}} - basebuild - {{isotime \"20060102-1504\"}}", - "source_image_name": "{{user `base_image`}}", - "flavor": "v1-standard-1", - "availability_zone": "ca-ymq-2", - "networks": [ - "{{user `stack_network`}}" - ], - "user_data_file": "{{user `cloud_user_data`}}" - } - ], - "provisioners": [ - { - "type": "shell", - "inline": [ - "mkdir -p /tmp/packer" - ] - }, - { - "type": "file", - "source": "provision/basebuild/", - "destination": "/tmp/packer" - }, - { - "type": "shell", - "scripts": [ - "provision/baseline.sh", - "provision/basebuild.sh", - "provision/system_reseal.sh" - ], - "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi" - } - ] -} diff --git a/packer/templates/builder.json b/packer/templates/builder.json new file mode 120000 index 000000000..bd227be50 --- /dev/null +++ b/packer/templates/builder.json @@ -0,0 +1 @@ +../common-packer/templates/builder.json
\ No newline at end of file diff --git a/packer/templates/docker.json b/packer/templates/docker.json index 1c8d3ec56..edea6d285 100644..120000 --- a/packer/templates/docker.json +++ b/packer/templates/docker.json @@ -1,54 +1 @@ -{ - "variables": { - "stack_tenant": null, - "stack_user": null, - "stack_pass": null, - "stack_network": null, - "base_image": null, - "cloud_user": null, - "distro": null, - "cloud_user_data": null - }, - "builders": [ - { - "type": "openstack", - "identity_endpoint": "https://auth.vexxhost.net/v2.0/", - "tenant_name": "{{user `stack_tenant`}}", - "username": "{{user `stack_user`}}", - "password": "{{user `stack_pass`}}", - "region": "ca-ymq-1", - "ssh_username": "{{user `cloud_user`}}", - "image_name": "{{user `distro`}} - docker - {{isotime \"20060102-1504\"}}", - "source_image_name": "{{user `base_image`}}", - "flavor": "v1-standard-1", - "availability_zone": "ca-ymq-2", - "networks": [ - "{{user `stack_network`}}" - ], - "user_data_file": "{{user `cloud_user_data`}}" - } - ], - "provisioners": [ - { - "type": "shell", - "inline": [ - "mkdir -p /tmp/packer" - ] - }, - { - "type": "file", - "source": "provision/basebuild/", - "destination": "/tmp/packer" - }, - { - "type": "shell", - "scripts": [ - "provision/baseline.sh", - "provision/basebuild.sh", - "provision/docker.sh", - "provision/system_reseal.sh" - ], - "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi" - } - ] -} +../common-packer/templates/docker.json
\ No newline at end of file diff --git a/packer/vars/centos.json b/packer/vars/centos-7.json index c5b8c79f2..366202c7a 100644 --- a/packer/vars/centos.json +++ b/packer/vars/centos-7.json @@ -1,6 +1,6 @@ { "base_image": "CentOS 7.1611 (2017-01-30) - LF upload", - "cloud_user": "centos", + "ssh_user": "centos", "distro": "CentOS 7", "cloud_user_data": "provision/rh-user_data.sh" } diff --git a/packer/vars/cloud-env.json.example b/packer/vars/cloud-env.json.example index 3a2ea9d2b..451c5dab9 100644 --- a/packer/vars/cloud-env.json.example +++ b/packer/vars/cloud-env.json.example @@ -3,4 +3,5 @@ "stack_user": "USERID", "stack_pass": "PASSWD", "stack_network": "NETID", + "ssh_proxy_host": "" } diff --git a/packer/vars/ubuntu-14.04.json b/packer/vars/ubuntu-14.04.json index dd81e2594..337ee1f1c 100644 --- a/packer/vars/ubuntu-14.04.json +++ b/packer/vars/ubuntu-14.04.json @@ -1,6 +1,6 @@ { "base_image": "Ubuntu 14.04 (2017-02-01) - LF upload", - "cloud_user": "ubuntu", "distro": "Ubuntu 14.04", + "ssh_user": "ubuntu", "cloud_user_data": "provision/null_data.sh" } diff --git a/packer/vars/ubuntu-16.04.json b/packer/vars/ubuntu-16.04.json index 12f9430ed..eadf41863 100644 --- a/packer/vars/ubuntu-16.04.json +++ b/packer/vars/ubuntu-16.04.json @@ -1,6 +1,6 @@ { "base_image": "Ubuntu 16.04 (2017-02-01) - LF upload", - "cloud_user": "ubuntu", "distro": "Ubuntu 16.04", + "ssh_user": "ubuntu", "cloud_user_data": "provision/null_data.sh" } |