This is an automated email from the ASF dual-hosted git repository. nickallen pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/metron.git
The following commit(s) were added to refs/heads/master by this push: new 0e2eadf METRON-2247 rpm-docker: Provide an option to bypass running rpmlint (tigerquoll via nickwallen) closes apache/metron#1503 0e2eadf is described below commit 0e2eadf7dc7aa9db3e77f97b43c5846625162059 Author: tigerquoll <tigerqu...@users.noreply.github.com> AuthorDate: Tue Sep 17 08:33:43 2019 -0400 METRON-2247 rpm-docker: Provide an option to bypass running rpmlint (tigerquoll via nickwallen) closes apache/metron#1503 --- .../roles/metron-builder/tasks/build-rpms.yml | 4 +++- metron-deployment/development/centos6/README.md | 22 ++++++++++++++++++++++ metron-deployment/development/centos6/Vagrantfile | 1 + metron-deployment/development/centos6/ansible.cfg | 1 + metron-deployment/development/centos7/Vagrantfile | 4 +--- metron-deployment/development/centos7/ansible.cfg | 1 + metron-deployment/development/ubuntu14/Vagrantfile | 1 + .../packaging/docker/rpm-docker/build.sh | 6 +++++- 8 files changed, 35 insertions(+), 5 deletions(-) diff --git a/metron-deployment/ansible/roles/metron-builder/tasks/build-rpms.yml b/metron-deployment/ansible/roles/metron-builder/tasks/build-rpms.yml index 7a5b6bd..f3883b8 100644 --- a/metron-deployment/ansible/roles/metron-builder/tasks/build-rpms.yml +++ b/metron-deployment/ansible/roles/metron-builder/tasks/build-rpms.yml @@ -15,8 +15,10 @@ # limitations under the License. # --- -- name: Build Metron RPM Packages +- name: Build Metron RPM Packages {{ '(skipping rpmlint)' if SKIP_RPMLINT is defined else '' }} shell: "{{ item }}" + environment: + SKIP_RPMLINT: "{{ SKIP_RPMLINT if SKIP_RPMLINT is defined else '' }}" args: chdir: "{{ metron_build_dir }}/metron-deployment" with_items: diff --git a/metron-deployment/development/centos6/README.md b/metron-deployment/development/centos6/README.md index 5ca3ed5..a00c5cb 100644 --- a/metron-deployment/development/centos6/README.md +++ b/metron-deployment/development/centos6/README.md @@ -78,6 +78,28 @@ Any platform that supports these tools is suitable, but the following instructio vagrant provision ``` +### Deployment optimizations + +1. Set environment variable + ``` + export ANSIBLE_ARGS='--extra-vars "SKIP_RPMLINT=1"' + ``` + To disable running rpmlint as part of the dev deployment task - this can save a couple of minutes of time on the deployment. + Either add this variable to your profile, or use it on the command line like + + ``` + env ANSIBLE_ARGS='--extra-vars "SKIP_RPMLINT=1"' vagrant up + ``` + +### Deployment debugging + +1. To enable more verbose logging of ansible actions during the deployment, use + ``` + env ANSIBLE_ARGS=' -vvvv' vagrant up + ``` + As this can produce large amounts of logging, it is best to redirect output to a file for later analysis. + + ### Explore Metron Navigate to the following resources to explore your newly minted Apache Metron environment. diff --git a/metron-deployment/development/centos6/Vagrantfile b/metron-deployment/development/centos6/Vagrantfile index 50571b4..21ca2bd 100644 --- a/metron-deployment/development/centos6/Vagrantfile +++ b/metron-deployment/development/centos6/Vagrantfile @@ -102,5 +102,6 @@ Vagrant.configure(2) do |config| ansible.skip_tags = ansibleSkipTags.split(",") if ansibleSkipTags != '' ansible.inventory_path = "ansible/inventory" ansible.compatibility_mode = "auto" + ansible.raw_arguments = Shellwords.shellsplit(ENV['ANSIBLE_ARGS']) if ENV['ANSIBLE_ARGS'] end end diff --git a/metron-deployment/development/centos6/ansible.cfg b/metron-deployment/development/centos6/ansible.cfg index 66f0afd..70ac5de 100644 --- a/metron-deployment/development/centos6/ansible.cfg +++ b/metron-deployment/development/centos6/ansible.cfg @@ -21,6 +21,7 @@ roles_path = ../../ansible/roles pipelining = True log_path = ./ansible.log callback_plugins = ../../ansible/callback_plugins +callback_whitelist = profile_tasks # fix for "ssh throws 'unix domain socket too long' " problem [ssh_connection] diff --git a/metron-deployment/development/centos7/Vagrantfile b/metron-deployment/development/centos7/Vagrantfile index 4706e42..28db76a 100644 --- a/metron-deployment/development/centos7/Vagrantfile +++ b/metron-deployment/development/centos7/Vagrantfile @@ -64,7 +64,6 @@ Vagrant.configure(2) do |config| if Vagrant.has_plugin?("vagrant-cachier") config.cache.enable :yum config.cache.scope = :box - config.cache.synced_folder_opts = { type: :nfs, mount_options: ['rw', 'vers=3', 'tcp', 'nolock'] @@ -102,7 +101,6 @@ Vagrant.configure(2) do |config| ansible.skip_tags = ansibleSkipTags.split(",") if ansibleSkipTags != '' ansible.inventory_path = "ansible/inventory" ansible.compatibility_mode = "auto" - ansible.raw_arguments = [ - ] + ansible.raw_arguments = Shellwords.shellsplit(ENV['ANSIBLE_ARGS']) if ENV['ANSIBLE_ARGS'] end end diff --git a/metron-deployment/development/centos7/ansible.cfg b/metron-deployment/development/centos7/ansible.cfg index 66f0afd..70ac5de 100644 --- a/metron-deployment/development/centos7/ansible.cfg +++ b/metron-deployment/development/centos7/ansible.cfg @@ -21,6 +21,7 @@ roles_path = ../../ansible/roles pipelining = True log_path = ./ansible.log callback_plugins = ../../ansible/callback_plugins +callback_whitelist = profile_tasks # fix for "ssh throws 'unix domain socket too long' " problem [ssh_connection] diff --git a/metron-deployment/development/ubuntu14/Vagrantfile b/metron-deployment/development/ubuntu14/Vagrantfile index ab44491..fcc5b71 100644 --- a/metron-deployment/development/ubuntu14/Vagrantfile +++ b/metron-deployment/development/ubuntu14/Vagrantfile @@ -97,5 +97,6 @@ Vagrant.configure(2) do |config| ansible.skip_tags = ansibleSkipTags.split(",") if ansibleSkipTags != '' ansible.inventory_path = "ansible/inventory" ansible.compatibility_mode = "auto" + ansible.raw_arguments = Shellwords.shellsplit(ENV['ANSIBLE_ARGS']) if ENV['ANSIBLE_ARGS'] end end diff --git a/metron-deployment/packaging/docker/rpm-docker/build.sh b/metron-deployment/packaging/docker/rpm-docker/build.sh index 68566b7..749cf8f 100755 --- a/metron-deployment/packaging/docker/rpm-docker/build.sh +++ b/metron-deployment/packaging/docker/rpm-docker/build.sh @@ -44,7 +44,11 @@ if [ $? -ne 0 ]; then exit 1 fi -rpmlint -i SPECS/metron.spec RPMS/*/metron* SRPMS/metron +if [ -z "${SKIP_RPMLINT}" ] || [ $SKIP_RPMLINT -eq 0 ]; then + rpmlint -i SPECS/metron.spec RPMS/*/metron* SRPMS/metron] +else + echo -n "SKIP_RPMLINT is non null and not equal to 0 - bypassing rpmlint" +fi # Ensure original user permissions are maintained after build if [ $OWNER_UID -ne 0 ]; then