neutron: 10.0.101.32
oob_user: Administrator
oob_password: Admin123
-workers:
- - name : aknode33
- oob: 192.168.41.133
- host: 192.168.2.33
- storage: 172.31.1.33
- pxe: 172.30.1.33
- ksn: 172.29.1.33
- neutron: 10.0.101.33
- oob_user: Administrator
- oob_password: Admin123
+#workers:
+# - name : aknode33
+# oob: 192.168.41.133
+# host: 192.168.2.33
+# storage: 172.31.1.33
+# pxe: 172.30.1.33
+# ksn: 172.29.1.33
+# neutron: 10.0.101.33
+# oob_user: Administrator
+# oob_password: Admin123
# - name : aknode34
# oob: 192.168.41.134
# host: 192.168.2.34
data = template.render(yaml=master)
target_file = "server-config/"+master['name']+target_suffix
print target_file
+ if os.path.exists(target_file):
+ print 'rc file exists maynot be new node'
+ continue
if not os.path.exists(os.path.dirname(target_file)):
- os.makedirs(os.path.dirname(target_file))
+ os.makedirs(os.path.dirname(target_file))
fd2 = open(target_file,'w')
fd2.write(data)
fd2.write("\n")
data = template.render(yaml=master)
target_file = "server-config/"+master['name']+target_suffix
print target_file
+ if os.path.exists(target_file):
+ print 'rc file exists maynot be new node'
+ continue
if not os.path.exists(os.path.dirname(target_file)):
- os.makedirs(os.path.dirname(target_file))
+ os.makedirs(os.path.dirname(target_file))
fd2 = open(target_file,'w')
fd2.write(data)
fd2.write("\n")
node_names:
- 'aknode31'
- 'aknode32'
- - 'aknode33'
# TODO(alanmeadows) move what is global about this document - everything except nodenames to global
assets:
- path: /opt/promjoin.sh
rack: RACK01
tags:
- 'masters'
----
-schema: 'drydock/BaremetalNode/v1'
-metadata:
- schema: 'metadata/Document/v1'
- name: aknode33
- layeringDefinition:
- abstract: false
- layer: site
- storagePolicy: cleartext
-data:
- host_profile: ComputePlane
- # the hostname for a server, could be used in multiple DNS domains to
- # represent different interfaces
- addressing:
- # Which network the address applies to. If a network appears in addressing
- # that isn't assigned to an interface, design validation will fail
- - network: oob
- address: 192.168.41.133
- - network: pxe
- # The address assigned. Either a explicit IPv4 or IPv6 address
- # or dhcp or slaac
- address: 172.30.1.33
- - network: oam
- address: 192.168.2.33
- - network: storage
- address: 172.31.1.33
- - network: overlay
- address: 10.0.101.33
- - network: calico
- address: 172.29.1.33
- metadata:
- rack: RACK01
- tags:
- - 'workers'
...
- 172.30.1.32
groups:
- system:nodes
- - document_name: kubelet-aknode33
- common_name: system:node:aknode33
- hosts:
- - aknode33
- - 192.168.2.33
- - 172.29.1.33
- - 172.30.1.33
- groups:
- - system:nodes
- document_name: scheduler
description: Service certificate for Kubernetes scheduler
common_name: system:kube-scheduler
systemctl restart docker || true
}
-cleanup() {
- rm -rf ./tars/$SITE/configs/promenade
- rm -rf ./tars/$SITE/configs/promenade-bundle
+create_directories() {
mkdir -p ./tars/$SITE/configs/promenade
mkdir -p ./tars/$SITE/configs/promenade-bundle
}
}
#install_docker
-cleanup
+create_directories
get_site_config
gen_certs
gen_bundle
--- /dev/null
+#!/bin/bash
+##############################################################################
+# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. #
+# #
+# 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. #
+##############################################################################
+
+set -x
+TIMESTAMP=$(date +"%Y%m%d%H%M")
+echo "Logging to /var/log/yaml_builds/transfer_$TIMESTAMP.log"
+exec > /var/log/yaml_builds/transfer_$TIMESTAMP.log
+exec 2>&1
+
+source $(dirname $0)/setenv.sh
+
+if [ -z "$1" ]
+then
+ echo "Please pass site name as command line argument"
+ exit -2
+else
+ SITE=${SITE:-$1}
+ echo "SITE=$SITE"
+fi
+
+if [ -z "$YAML_BUILDS" ]
+then
+ echo "Please set YAML_BUILDS"
+ exit -3
+fi
+
+
+source $(dirname $0)/env_$SITE.sh
+
+cd $YAML_BUILDS
+
+scp $YAML_BUILDS/tars/promenade-bundle-$SITE.tar $GENESIS_HOST:/tmp/
+ssh $GENESIS_HOST << EOF
+ # TODO avoid following hard coding$
+ cp /tmp/promenade-bundle-$SITE.tar /root/akraino/
+ cd /root/akraino/
+ tar -xmf promenade-bundle-$SITE.tar
+EOF
+# Update BIOS Setting
+python $YAML_BUILDS/scripts/update_bios_settings.py $SITE.yaml