blob: 4fba92939ab3734624bd602d2c1a30703f2553b9 [file] [log] [blame]
Naveen Sampath04696f72022-06-13 15:19:14 +05301#!/bin/bash
2#
3# Copyright 2022-present Open Networking Foundation
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#/
16
17echo '[ ! -z "$TERM" -a -r /etc/banner ] && cat /etc/issue && cat /etc/banner' \
18 >> /etc/bash.bashrc \
19 ; echo -e "
20-----------------------------------------------------------
21 __ _______ _____ _____ _ _____
22 \ \ / / ____|/ ____| / ____| | |_ _|
23 \ \ / / | __| | | | | | | |
24 \ \/ /| | |_ | | | | | | | |
25 \ / | |__| | |____ | |____| |____ _| |_
26 \/ \_____|\_____| \_____|______|_____|
27
28-----------------------------------------------------------
29 Welcome to VGC-CLI
30-----------------------------------------------------------
31
32"\
33 > /etc/banner
34
35# ENVIRONMENT VARIABLES
36echo "export KAFKA_ADAPTER_HOST=${KAFKA_ADAPTER_HOST}" >> /home/voltha-go-controller/.bash_profile
37echo "export KAFKA_ADAPTER_PORT=9092" >> /home/voltha-go-controller/.bash_profile
38echo "export KAFKA_CLUSTER_HOST=${KAFKA_CLUSTER_HOST}" >> /home/voltha-go-controller/.bash_profile
39echo "export KAFKA_CLUSTER_PORT=9092" >> /home/voltha-go-controller/.bash_profile
40echo "export KV_STORE_HOST=${KV_STORE_HOST}" >> /home/voltha-go-controller/.bash_profile
41echo "export KV_STORE_PORT=${KV_STORE_PORT}" >> /home/voltha-go-controller/.bash_profile
42echo "export KV_STORE_TYPE=redis" >> /home/voltha-go-controller/.bash_profile
43echo "export VOLTHA_HOST=${VOLTHA_HOST}" >> /home/voltha-go-controller/.bash_profile
44echo "export VOLTHA_PORT=${VOLTHA_PORT}" >> /home/voltha-go-controller/.bash_profile
45echo "export KV_STORE_TIMEOUT=10" >> /home/voltha-go-controller/.bash_profile
46echo "export BANNER=false" >> /home/voltha-go-controller/.bash_profile
47
48# ALIAS FOR VGC COMMANDS
49echo "alias flows='./vgcctl flows'" >> /home/voltha-go-controller/.bash_profile
50echo "alias igmp='./vgcctl igmp'" >> /home/voltha-go-controller/.bash_profile
51echo "alias mvlan='./vgcctl mvlan'" >> /home/voltha-go-controller/.bash_profile
52echo "alias port='./vgcctl port'" >> /home/voltha-go-controller/.bash_profile
53echo "alias service='./vgcctl service'" >> /home/voltha-go-controller/.bash_profile
54echo "alias vnet='./vgcctl vnet'" >> /home/voltha-go-controller/.bash_profile
55echo "alias vpvs='./vgcctl vpvs'" >> /home/voltha-go-controller/.bash_profile
56echo "alias meter='./vgcctl meter'" >> /home/voltha-go-controller/.bash_profile
57echo "alias group='./vgcctl group'" >> /home/voltha-go-controller/.bash_profile
58echo "alias igmpgroup='./vgcctl igmpgroup'">> /home/voltha-go-controller/.bash_profile
59echo "alias igmpchannel='./vgcctl igmpchannel'">> /home/voltha-go-controller/.bash_profile
60echo "alias igmpdevice='./vgcctl igmpdevice'">>/home/voltha-go-controller/.bash_profile
61echo "alias igmpport='./vgcctl igmpport'">>/home/voltha-go-controller/.bash_profile
62echo "alias cacheicmp='./vgcctl cacheicmp'">>/home/voltha-go-controller/.bash_profile
63echo "alias cachemvlan='./vgcctl cachemvlan'">>/home/voltha-go-controller/.bash_profile
64echo "alias cacheport='./vgcctl cacheport'">>/home/voltha-go-controller/.bash_profile
65echo "alias tasklist='./vgcctl tasklist'">>/home/voltha-go-controller/.bash_profile
66echo "alias device='./vgcctl device'">>/home/voltha-go-controller/.bash_profile
67echo "alias help='./vgcctl --help'">>/home/voltha-go-controller/.bash_profile
68echo "alias dhcpsession='./vgcctl dhcpsession'">>/home/voltha-go-controller/.bash_profile
69echo "alias ponports='./vgcctl ponports'">>/home/voltha-go-controller/.bash_profile
70echo "alias mcast='./vgcctl mcast'" >> /home/voltha-go-controller/.bash_profile
71
72chown voltha-go-controller.voltha-go-controller /home/voltha-go-controller/.bash_profile
73ssh-keygen -A
74/usr/sbin/sshd -D &
75/home/voltha-go-controller/voltha-go-controller