Skip to content

Commit fe51a90

Browse files
author
Dean Troyer
committed
Refactor source installation
Clean up and organize the download and configuration of source repositories. Change-Id: Iaf38c0aed0a83ebf9a5da3505fe92c9fa200ac1e
1 parent 4b1dbb5 commit fe51a90

2 files changed

Lines changed: 44 additions & 78 deletions

File tree

lib/quantum

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
# install_quantumclient
1212
# install_quantum_agent_packages
1313
# install_quantum_third_party
14-
# setup_quantum
15-
# setup_quantumclient
1614
# configure_quantum
1715
# init_quantum
1816
# configure_quantum_third_party
@@ -343,11 +341,13 @@ function init_quantum() {
343341
# install_quantum() - Collect source and prepare
344342
function install_quantum() {
345343
git_clone $QUANTUM_REPO $QUANTUM_DIR $QUANTUM_BRANCH
344+
setup_develop $QUANTUM_DIR
346345
}
347346

348347
# install_quantumclient() - Collect source and prepare
349348
function install_quantumclient() {
350349
git_clone $QUANTUMCLIENT_REPO $QUANTUMCLIENT_DIR $QUANTUMCLIENT_BRANCH
350+
setup_develop $QUANTUMCLIENT_DIR
351351
}
352352

353353
# install_quantum_agent_packages() - Collect source and prepare
@@ -356,14 +356,6 @@ function install_quantum_agent_packages() {
356356
quantum_plugin_install_agent_packages
357357
}
358358

359-
function setup_quantum() {
360-
setup_develop $QUANTUM_DIR
361-
}
362-
363-
function setup_quantumclient() {
364-
setup_develop $QUANTUMCLIENT_DIR
365-
}
366-
367359
# Start running processes, including screen
368360
function start_quantum_service_and_check() {
369361
# Start the Quantum service

stack.sh

Lines changed: 42 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -556,117 +556,99 @@ if [[ $TRACK_DEPENDS = True ]] ; then
556556
fi
557557

558558

559-
# Check Out Source
560-
# ----------------
559+
# Check Out and Install Source
560+
# ----------------------------
561561

562562
echo_summary "Installing OpenStack project source"
563563

564-
# Grab clients first
564+
# Install clients libraries
565565
install_keystoneclient
566566
install_glanceclient
567567
install_cinderclient
568568
install_novaclient
569-
# Check out the client libs that are used most
569+
if is_service_enabled swift glance; then
570+
install_swiftclient
571+
fi
572+
if is_service_enabled quantum nova; then
573+
install_quantumclient
574+
fi
575+
570576
git_clone $OPENSTACKCLIENT_REPO $OPENSTACKCLIENT_DIR $OPENSTACKCLIENT_BRANCH
571577
setup_develop $OPENSTACKCLIENT_DIR
572578

573-
# glance, swift middleware and nova api needs keystone middleware
574-
if is_service_enabled key g-api n-api s-proxy; then
575-
# unified auth system (manages accounts/tokens)
579+
if is_service_enabled key; then
576580
install_keystone
581+
configure_keystone
577582
fi
578583

579584
if is_service_enabled s-proxy; then
580-
install_swiftclient
581585
install_swift
586+
configure_swift
587+
582588
if is_service_enabled swift3; then
583589
# swift3 middleware to provide S3 emulation to Swift
584590
git_clone $SWIFT3_REPO $SWIFT3_DIR $SWIFT3_BRANCH
591+
setup_develop $SWIFT3_DIR
585592
fi
586593
fi
587594

588595
if is_service_enabled g-api n-api; then
589596
# image catalog service
590597
install_glance
598+
configure_glance
599+
fi
600+
601+
if is_service_enabled cinder; then
602+
install_cinder
603+
configure_cinder
604+
fi
605+
606+
if is_service_enabled quantum; then
607+
install_quantum
608+
install_quantum_third_party
591609
fi
610+
592611
if is_service_enabled nova; then
593612
# compute service
594613
install_nova
614+
cleanup_nova
615+
configure_nova
595616
fi
617+
596618
if is_service_enabled n-novnc; then
597619
# a websockets/html5 or flash powered VNC console for vm instances
598620
git_clone $NOVNC_REPO $NOVNC_DIR $NOVNC_BRANCH
599621
fi
622+
600623
if is_service_enabled n-spice; then
601624
# a websockets/html5 or flash powered SPICE console for vm instances
602625
git_clone $SPICE_REPO $SPICE_DIR $SPICE_BRANCH
603626
fi
627+
604628
if is_service_enabled horizon; then
605629
# dashboard
606630
install_horizon
631+
configure_horizon
607632
fi
608-
if is_service_enabled quantum; then
609-
install_quantum
610-
install_quantumclient
611-
install_quantum_third_party
612-
fi
613-
if is_service_enabled heat; then
614-
install_heat
615-
install_heatclient
616-
fi
617-
if is_service_enabled cinder; then
618-
install_cinder
619-
fi
633+
620634
if is_service_enabled ceilometer; then
621635
install_ceilometerclient
622636
install_ceilometer
623637
fi
624638

625-
626-
# Initialization
627-
# ==============
628-
629-
echo_summary "Configuring OpenStack projects"
630-
631-
# Set up our checkouts so they are installed in the python path
632-
633-
if is_service_enabled key g-api n-api s-proxy; then
634-
configure_keystone
635-
fi
636-
637-
if is_service_enabled s-proxy; then
638-
configure_swift
639-
if is_service_enabled swift3; then
640-
setup_develop $SWIFT3_DIR
641-
fi
642-
fi
643-
644-
if is_service_enabled g-api n-api; then
645-
configure_glance
646-
fi
647-
648-
if is_service_enabled nova; then
649-
# First clean up old instances
650-
cleanup_nova
651-
configure_nova
652-
fi
653-
654-
if is_service_enabled horizon; then
655-
configure_horizon
656-
fi
657-
658-
if is_service_enabled quantum; then
659-
setup_quantumclient
660-
setup_quantum
661-
fi
662-
663639
if is_service_enabled heat; then
640+
install_heat
641+
install_heatclient
664642
configure_heat
665643
configure_heatclient
666644
fi
667645

668-
if is_service_enabled cinder; then
669-
configure_cinder
646+
if is_service_enabled tls-proxy; then
647+
configure_CA
648+
init_CA
649+
init_cert
650+
# Add name to /etc/hosts
651+
# don't be naive and add to existing line!
670652
fi
671653

672654
if [[ $TRACK_DEPENDS = True ]] ; then
@@ -678,14 +660,6 @@ if [[ $TRACK_DEPENDS = True ]] ; then
678660
exit 0
679661
fi
680662

681-
if is_service_enabled tls-proxy; then
682-
configure_CA
683-
init_CA
684-
init_cert
685-
# Add name to /etc/hosts
686-
# don't be naive and add to existing line!
687-
fi
688-
689663

690664
# Syslog
691665
# ------

0 commit comments

Comments
 (0)