Code to start\stop keero components using devstack functions
This commit is contained in:
		@@ -16,6 +16,7 @@ RABBIT_PASSWORD=$lab_password
 | 
				
			|||||||
SERVICE_PASSWORD=$lab_password
 | 
					SERVICE_PASSWORD=$lab_password
 | 
				
			||||||
SERVICE_TOKEN=tokentoken
 | 
					SERVICE_TOKEN=tokentoken
 | 
				
			||||||
ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-api-cw,h-eng
 | 
					ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-api-cw,h-eng
 | 
				
			||||||
 | 
					ENABLED_SERVICES+=,conductor,portas
 | 
				
			||||||
 | 
					
 | 
				
			||||||
LOGFILE=/opt/stack/devstack/stack.sh.log
 | 
					LOGFILE=/opt/stack/devstack/stack.sh.log
 | 
				
			||||||
SCREEN_LOGDIR=/opt/stack/log/
 | 
					SCREEN_LOGDIR=/opt/stack/log/
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,7 @@
 | 
				
			|||||||
#!/bin/bash
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
DEVSTACK_DIR=/home/stack/devstack
 | 
					DEVSTACK_DIR=/home/stack/devstack
 | 
				
			||||||
 | 
					INSTALL_DIR=/opt/stack
 | 
				
			||||||
 | 
					
 | 
				
			||||||
MYSQL_DB_TMPFS=true
 | 
					MYSQL_DB_TMPFS=true
 | 
				
			||||||
MYSQL_DB_TMPFS_SIZE=128M
 | 
					MYSQL_DB_TMPFS_SIZE=128M
 | 
				
			||||||
@@ -8,7 +9,6 @@ MYSQL_DB_TMPFS_SIZE=128M
 | 
				
			|||||||
NOVA_CACHE_TMPFS=true
 | 
					NOVA_CACHE_TMPFS=true
 | 
				
			||||||
NOVA_CACHE_TMPFS_SIZE=24G
 | 
					NOVA_CACHE_TMPFS_SIZE=24G
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
#======================================
 | 
					#======================================
 | 
				
			||||||
source $DEVSTACK_DIR/openrc admin admin
 | 
					source $DEVSTACK_DIR/openrc admin admin
 | 
				
			||||||
source ./functions.sh
 | 
					source ./functions.sh
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,6 +20,7 @@ $DEVSTACK_DIR/stack.sh
 | 
				
			|||||||
# Executing post-stack actions
 | 
					# Executing post-stack actions
 | 
				
			||||||
#===============================================================================
 | 
					#===============================================================================
 | 
				
			||||||
source ./post-stack.sh no-localrc
 | 
					source ./post-stack.sh no-localrc
 | 
				
			||||||
 | 
					source ./start-keero.sh no-localrc
 | 
				
			||||||
#===============================================================================
 | 
					#===============================================================================
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										25
									
								
								Deployment/devstack-scripts/start-keero.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								Deployment/devstack-scripts/start-keero.sh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
				
			|||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [[ -z "$1" ]] ; then
 | 
				
			||||||
 | 
					    source ./localrc
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					die_if_not_set INSTALL_DIR
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Starting Portas
 | 
				
			||||||
 | 
					#================
 | 
				
			||||||
 | 
					if [[ ! -d "$INSTALL_DIR/portas" ]] ; then
 | 
				
			||||||
 | 
					    mkdir -p "$INSTALL_DIR/portas"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cp "$INSTALL_DIR/keero/portas/etc" "$INSTALL_DIR/portas/etc"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					screen_it portas "cd $INSTALL_DIR/portas && portas-api --config-file=$INSTALL_DIR/portas/etc/portas-api.conf"
 | 
				
			||||||
 | 
					#================
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Starting Conductor
 | 
				
			||||||
 | 
					#===================
 | 
				
			||||||
 | 
					screen_it conductor "cd $INSTALL_DIR/keero/conductor && bash ./tools/with_venv.sh ./bin/app.py"
 | 
				
			||||||
 | 
					#===================
 | 
				
			||||||
@@ -18,5 +18,6 @@ $DEVSTACK_DIR/unstack.sh
 | 
				
			|||||||
# Executing post-unstack actions
 | 
					# Executing post-unstack actions
 | 
				
			||||||
#===============================================================================
 | 
					#===============================================================================
 | 
				
			||||||
source ./post-unstack.sh no-localrc
 | 
					source ./post-unstack.sh no-localrc
 | 
				
			||||||
 | 
					source ./stop-keero.sh no-localrc
 | 
				
			||||||
#===============================================================================
 | 
					#===============================================================================
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										12
									
								
								Deployment/devstack-scripts/stop-keero.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								Deployment/devstack-scripts/stop-keero.sh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
				
			|||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [[ -z "$1" ]] ; then
 | 
				
			||||||
 | 
					    source ./localrc
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Stopping Keero components
 | 
				
			||||||
 | 
					#==========================
 | 
				
			||||||
 | 
					for serv in conductor portas ; do
 | 
				
			||||||
 | 
					    screen -S $SCREEN_NAME -p $serv -X kill
 | 
				
			||||||
 | 
					done
 | 
				
			||||||
 | 
					#==========================
 | 
				
			||||||
		Reference in New Issue
	
	Block a user