Allow user to specify the first boot script 39/139/1
authordavidplunkett <dp7642@att.com>
Fri, 27 Jul 2018 05:35:08 +0000 (01:35 -0400)
committerdavidplunkett <dp7642@att.com>
Fri, 27 Jul 2018 05:35:08 +0000 (01:35 -0400)
Change-Id: I6e5833a513001dcce81b0fe2476c55436aca8982
Signed-off-by: davidplunkett <dp7642@att.com>
firstboot-airship-iab.sh.template [new file with mode: 0644]
firstboot-genesis.sh.template [new file with mode: 0644]

diff --git a/firstboot-airship-iab.sh.template b/firstboot-airship-iab.sh.template
new file mode 100644 (file)
index 0000000..5002318
--- /dev/null
@@ -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 (file)
index 0000000..8405f2f
--- /dev/null
@@ -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
+