#!/usr/bin/env bash # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you 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. ## @description main menu ## @audience public ## @stability stable main_menu() { cat< [prepare system environment] ------------------------------------------------------------------------------------ MENULIST echo -e " \e[32m1.prepare operation system\e[0m" echo -e " \e[32m2.prepare operation system kernel\e[0m" echo -e " \e[32m3.prepare GCC version\e[0m" echo -e " \e[32m4.check GPU\e[0m" echo -e " \e[32m5.prepare user&group\e[0m" echo -e " \e[32m6.prepare nvidia environment\e[0m" echo -e "" echo -e " \e[32mb.back main menu\e[0m" cat< [install component] ------------------------------------------------------------------------------------ MENULIST echo -e " \e[32m1.instll etcd\e[0m" echo -e " \e[32m2.instll docker\e[0m" echo -e " \e[32m3.instll calico network\e[0m" echo -e " \e[32m4.instll nvidia driver\e[0m" echo -e " \e[32m5.instll nvidia docker\e[0m" echo -e " \e[32m6.instll yarn container-executor\e[0m" echo -e " \e[32m7.instll submarine autorun script\e[0m" echo -e "" echo -e " \e[32mb.back main menu\e[0m" cat< [uninstll component] ------------------------------------------------------------------------------------ MENULIST echo -e " \e[32m1.uninstll etcd\e[0m" echo -e " \e[32m2.uninstll docker\e[0m" echo -e " \e[32m3.uninstll calico network\e[0m" echo -e " \e[32m4.uninstll nvidia driver\e[0m" echo -e " \e[32m5.uninstll nvidia docker\e[0m" echo -e " \e[32m6.uninstll yarn container-executor\e[0m" echo -e " \e[32m7.uninstll submarine autorun script\e[0m" echo -e "" echo -e " \e[32mb.back main menu\e[0m" cat< [stop component] ------------------------------------------------------------------------------------ MENULIST echo -e " \e[32m1.start etcd\e[0m" echo -e " \e[32m2.start docker\e[0m" echo -e " \e[32m3.start calico network\e[0m" echo -e "" echo -e " \e[32mb.back main menu\e[0m" cat< [stop component] ------------------------------------------------------------------------------------ MENULIST echo -e " \e[32m1.stop etcd\e[0m" echo -e " \e[32m2.stop docker\e[0m" echo -e " \e[32m3.stop calico network\e[0m" echo -e "" echo -e " \e[32mb.back main menu\e[0m" cat<