From 558e3e04ea7cd1cdcad64c36f262e0e61fbec521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Douglas=20Mendiz=C3=A1bal?= Date: Thu, 5 Mar 2015 16:47:41 -0600 Subject: [PATCH] Refactor dogtag gate scripts Refactor dogtag installation so it can be run with sudo. Change-Id: I4d7128dc4ce153a9c96fe2d47e2fcaab1d2bb25c --- contrib/dogtag/install_dogtag.sh | 125 +++++++++++++++++++++++++++++++ functionaltests/pre_test_hook.sh | 101 +------------------------ 2 files changed, 127 insertions(+), 99 deletions(-) create mode 100755 contrib/dogtag/install_dogtag.sh diff --git a/contrib/dogtag/install_dogtag.sh b/contrib/dogtag/install_dogtag.sh new file mode 100755 index 000000000..79f533b9a --- /dev/null +++ b/contrib/dogtag/install_dogtag.sh @@ -0,0 +1,125 @@ +#!/bin/bash + +# Copyright 2015 Rackspace, Inc. +# +# 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. + +# install_dogtag.sh +# Installs a DogTag CA and KRA inside a devstack vm. + +set -e + +function install_389_directory_server { + # Make sure that 127.0.0.1 resolves to localhost.localdomain (fqdn) + sed -i "s/^127\.0\.0\.1.*/127\.0\.0\.1\tlocalhost.localdomain localhost/" /etc/hosts + + yum install -y 389-ds-base + mkdir -p /etc/389-ds + + cat > /etc/389-ds/setup.inf < /etc/dogtag/ca.cfg < /etc/dogtag/kra.cfg < /etc/389-ds/setup.inf < /etc/dogtag/ca.cfg < /etc/dogtag/kra.cfg <