From: davidplunkett Date: Fri, 27 Jul 2018 05:35:08 +0000 (-0400) Subject: Allow user to specify the first boot script X-Git-Tag: 0.0.1~11 X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=530b09d649b7cfc0c2e53cf01be5fb2673209417;p=redfish.git Allow user to specify the first boot script Change-Id: I6e5833a513001dcce81b0fe2476c55436aca8982 Signed-off-by: davidplunkett --- diff --git a/firstboot-airship-iab.sh.template b/firstboot-airship-iab.sh.template new file mode 100644 index 0000000..5002318 --- /dev/null +++ b/firstboot-airship-iab.sh.template @@ -0,0 +1,32 @@ +#!/bin/bash +# +# Copyright 2018 AT&T Intellectual Property. All other 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. + +# Add proxy settings if required for your environment +# +#export http_proxy=http://your.proxy.com:8080/ +#export https_proxy=http://your.proxy.com:8080/ + +HOSTNAME=$(hostname -s) +echo "### BEGINING FIRSTBOOT SCRIPT ###" "[`date`]" +echo " " +echo "### BUILDING SERVER [$HOSTNAME]" +echo " " + +echo "Updating available packages" +apt-get update + +exit + diff --git a/firstboot-genesis.sh.template b/firstboot-genesis.sh.template new file mode 100644 index 0000000..8405f2f --- /dev/null +++ b/firstboot-genesis.sh.template @@ -0,0 +1,49 @@ +#!/bin/bash +# +# Copyright 2018 AT&T Intellectual Property. All other 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. + +# Add proxy settings if required for your environment +# +#export http_proxy=http://your.proxy.com:8080/ +#export https_proxy=http://your.proxy.com:8080/ + +HOSTNAME=$(hostname -s) +echo "### BEGINING FIRSTBOOT SCRIPT ###" "[`date`]" +echo " " +echo "### BUILDING SERVER [$HOSTNAME]" +echo " " + +echo "Updating available packages" +apt-get update +apt-get install -y apt-transport-https + +echo "Adding docker source and key" +curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - +echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" >/etc/apt/sources.list.d/kubernetes.list + +echo "Updating available packages" +apt-get update &>/dev/null + +echo "Installing docker" +apt-get install -y docker.io aufs-tools 2>&1 + +echo "Checking that docker is running" +docker ps + +echo "Installing sshpass, python-requests and xorriso" +apt-get install -y sshpass python-requests xorriso 2>&1 + +exit +