#!/usr/bin/env bash ############################################################################## # Copyright (c) 2015 Tim Rozet (Red Hat), Dan Radez (Red Hat) and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## ##Post configuration after install ##params: none function configure_post_install { local opnfv_attach_networks ovs_ip ip_range net_cidr tmp_ip opnfv_attach_networks="admin_network public_network" echo -e "${blue}INFO: Post Install Configuration Running...${reset}" echo -e "${blue}INFO: Configuring ssh for root to overcloud nodes...${reset}" # copy host key to instack scp ${SSH_OPTIONS[@]} /root/.ssh/id_rsa.pub "stack@$UNDERCLOUD":jumphost_id_rsa.pub # add host key to overcloud nodes authorized keys ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" << EOI source stackrc nodes=\$(nova list | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+") for node in \$nodes; do cat ~/jumphost_id_rsa.pub | ssh -T ${SSH_OPTIONS[@]} "heat-admin@\$node" 'cat >> ~/.ssh/authorized_keys' done EOI if [ "${deploy_options_array['dataplane']}" == 'ovs_dpdk' ]; then echo -e "${blue}INFO: Bringing up br-phy and ovs-agent for dpdk compute nodes...${reset}" compute_nodes=$(undercloud_connect stack "source stackrc; nova list | grep compute | wc -l") i=0 while [ "$i" -lt "$compute_nodes" ]; do overcloud_connect compute${i} "sudo ifup br-phy; sudo systemctl restart neutron-openvswitch-agent" i=$((i + 1)) done fi ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <