Revision 6d20b7f3

b/snf-common/conf/00-snf-common-admins.conf
1
## -*- coding: utf-8 -*-
2
##
3
## Admin names and email addresses
4
###################################
5
#
6
#ADMINS = (
7
#    # ('Your Name', 'your_email@domain.com'),
8
#)
9
#
10
#MANAGERS = ADMINS
11
#
12
## Email configuration
13
#EMAIL_HOST = "127.0.0.1"
14
#EMAIL_HOST_USER = ""
15
#EMAIL_HOST_PASSWORD = ""
16
#EMAIL_SUBJECT_PREFIX = "[email-subject-prefix] "
17
#DEFAULT_CHARSET = 'utf-8'
18
#
19
## Address to use for outgoing emails
20
#DEFAULT_FROM_EMAIL = "~okeanos <no-reply@grnet.gr>"
b/snf-cyclades-app/conf/20-snf-cyclades-app-backend.conf
1
## -*- coding: utf-8 -*-
2
##
3
## Ganeti backend configuration
4
####################################
5
#
6
## This prefix gets used when determining the instance names
7
## of Synnefo VMs at the Ganeti backend.
8
## The dash must always appear in the name!
9
#BACKEND_PREFIX_ID = "snf-"
10
#
11
## The following dictionary defines deployment-specific
12
## arguments to the RAPI CreateInstance call.
13
## At a minimum it should contain the
14
## 'disk_template', 'os_provider', and 'hvparams' keys.
15
##
16
## More specifically:
17
## a) disk_template:
18
##    The disk template to use when creating the instance.
19
##    Suggested values: 'plain', or 'drbd'.
20
## b) os:
21
##    The OS provider to use (customized Ganeti Instance Image)
22
## c) hvparams:
23
##    Hypervisor-specific parameters (serial_console = False, see #785)
24
## d) If using the DRBD disk_template, you may want to include
25
##    wait_for_sync = False (see #835).
26
##
27
#GANETI_CREATEINSTANCE_KWARGS = {
28
#    'os': 'snf-image+default',
29
#    'hvparams': {'serial_console': False},
30
#    'wait_for_sync': False}
31
#
32
## If True, qemu-kvm will hotplug a NIC when connecting a vm to
33
## a network. This requires qemu-kvm=1.0.
34
#GANETI_USE_HOTPLUG = False
35
#
36
## This module implements the strategy for allocating a vm to a backend
37
#BACKEND_ALLOCATOR_MODULE = "synnefo.logic.allocators.default_allocator"
38
## Refresh backend statistics timeout, in minutes, used in backend allocation
39
#BACKEND_REFRESH_MIN = 15
b/snf-cyclades-app/conf/20-snf-cyclades-app-cloudbar.conf
1
#CLOUDBAR_ACTIVE = True
2
#CLOUDBAR_LOCATION = 'https://accounts.okeanos.grnet.gr/static/im/cloudbar/'
3
#CLOUDBAR_COOKIE_NAME = '_pithos2_a'
4
#CLOUDBAR_ACTIVE_SERVICE = 'cloud'
5
#CLOUDBAR_SERVICES_URL = 'https://accounts.okeanos.grnet.gr/im/get_services'
6
#CLOUDBAR_MENU_URL = 'https://accounts.okeanos.grnet.gr/im/get_menu'
7
#
b/snf-cyclades-app/conf/20-snf-cyclades-app-plankton.conf
1
## -*- coding: utf-8 -*-
2
##
3
## Plankton configuration
4
#########################
5
#
6
## Backend settings
7
#BACKEND_DB_CONNECTION = 'sqlite:////usr/share/synnefo/pithos/backend.db'
8
#BACKEND_BLOCK_PATH = '/usr/share/synnefo/pithos/data/'
9
#
10
## The Pithos container where images will be stored by default
11
#DEFAULT_PLANKTON_CONTAINER = 'images'
12
#
13
#ALLOWED_DISK_FORMATS = ('diskdump', 'extdump', 'ntfsdump')
14
#DEFAULT_DISK_FORMAT = 'diskdump'
15
#
16
#ALLOWED_CONTAINER_FORMATS = ('aki', 'ari', 'ami', 'bare', 'ovf')
17
#DEFAULT_CONTAINER_FORMAT = 'bare'
18
#
19
## The owner of the images that will be marked as "system images" by the UI
20
#SYSTEM_IMAGES_OWNER = 'okeanos'
b/snf-cyclades-app/conf/20-snf-cyclades-app-queues.conf
1
## -*- coding: utf-8 -*-
2
##
3
## Queues, exchanges and bindings for AMQP
4
############################################
5
#
6
## List of RabbitMQ endpoints
7
#AMQP_HOSTS = ["amqp://username:password@host:port"]
8
## AMQP Backend Client. Currently only puka
9
#AMQP_BACKEND = 'puka'
10
#
11
#EXCHANGE_GANETI = "ganeti"  # Messages from Ganeti
b/snf-cyclades-app/conf/20-snf-cyclades-app-ui.conf
1
## -*- coding: utf-8 -*-
2
##
3
## UI settings
4
####################
5
#
6
## API URL
7
#COMPUTE_API_URL = '/api/v1.1'
8
#
9
## base url for ui static files
10
## if not set, defaults to MEDIA_URL + 'snf-<latest_ui_version>/'
11
#UI_MEDIA_URL = '/static/ui/static/snf/'
12
#
13
## UI requests to the API layer time out after that many milliseconds
14
#TIMEOUT = 10 * 1000
15
#
16
## A list of suggested server tags (server metadata keys)
17
#DEFAULT_KEYWORDS = ["OS", "Role", "Location", "Owner"]
18
#
19
## A list of allowed icons for OS Images
20
#IMAGE_ICONS = ["redhat", "ubuntu", "debian", "windows", "gentoo", "archlinux",
21
#               "centos", "fedora", "freebsd", "netbsd", "openbsd", "slackware",
22
#               "suse", "kubuntu"]
23
#
24
## How often should the UI request changes from the API
25
#UI_UPDATE_INTERVAL = 5000
26
#
27
## Milieconds to increase the interval after UI_UPDATE_INTERVAL_INCREASE_AFTER_CALLS_COUNT calls
28
## of recurrent api requests
29
#UI_UPDATE_INTERVAL_INCREASE = UI_UPDATE_INTERVAL / 4
30
#UI_UPDATE_INTERVAL_INCREASE_AFTER_CALLS_COUNT = 4
31
#
32
## Maximum update interval
33
#UI_UPDATE_INTERVAL_MAX = UI_UPDATE_INTERVAL * 3
34
#
35
## Fast update interval
36
#UI_UPDATE_INTERVAL_FAST = UI_UPDATE_INTERVAL / 2
37
#
38
## Miliseconds to remove from the previous server response time used in
39
## consecutive API calls (aligning changes-since attribute).
40
#UI_CHANGES_SINCE_ALIGNMENT = 0
41
#
42
## List of emails used for sending the feedback messages to (following the ADMINS format)
43
#FEEDBACK_CONTACTS = (
44
#    # ('Contact Name', 'contact_email@domain.com'),
45
#)
46
#
47
## Email from which the feedback emails will be sent from
48
#FEEDBACK_EMAIL_FROM = "~okeanos <no-reply@grnet.gr>"
49
#
50
## URL to redirect not authenticated users
51
#UI_LOGIN_URL = "/im/login"
52
#
53
## URL to redirect user to when he logs out from the ui
54
#UI_LOGOUT_URL = "/im/logout"
55
#
56
## Cookie name to retrieve authentication data from
57
#UI_AUTH_COOKIE_NAME = '_pithos2_a'
58
#
59
## Flavor options that we provide to the user as predefined
60
## cpu/ram/disk combinations on vm create wizard
61
#VM_CREATE_SUGGESTED_FLAVORS = {
62
#    'small': {
63
#        'cpu': 1,
64
#        'ram': 1024,
65
#        'disk': 20,
66
#        'disk_template': 'drbd'
67
#    },
68
#    'medium': {
69
#        'cpu': 2,
70
#        'ram': 2048,
71
#        'disk': 30,
72
#        'disk_template': 'drbd'
73
#
74
#    },
75
#    'large': {
76
#        'cpu': 4,
77
#        'ram': 4096,
78
#        'disk': 40,
79
#        'disk_template': 'drbd'
80
#
81
#    }
82
#}
83
#
84
## A list of metadata keys to clone from image
85
## to the virtual machine on its creation.
86
#VM_IMAGE_COMMON_METADATA = ["OS", "loginname", "logindomain", "users", "remote"]
87
#
88
## A list of suggested vm roles to display to user on create wizard
89
#VM_CREATE_SUGGESTED_ROLES = ["Database server", "File server", "Mail server", "Web server", "Proxy"]
90
#
91
## Template to be used for suggesting the user a default name for newly created
92
## vms. {0} gets replaced by the image OS value
93
#VM_CREATE_NAME_TPL = "My {0} server"
94
#
95
## Template to use to build vm hostname
96
#UI_VM_HOSTNAME_FORMAT = 'snf-%(id)s.vm.okeanos.grnet.gr'
97
#
98
## Name/description metadata for the available flavor disk templates
99
## Dict key is the disk_template value as stored in database
100
#UI_FLAVORS_DISK_TEMPLATES_INFO = {
101
#    'drbd': {'name': 'DRBD',
102
#             'description': 'DRBD storage.'},
103
#}
104
#
105
## Override default connect prompt messages. The setting gets appended to the
106
## ui default values so you only need to modify parameters you need to alter.
107
##
108
## Indicative format:
109
## {
110
##    '<browser os1>': {
111
##        '<vm os family1>': ['top message....', 'bottom message'],
112
##        '<vm os family 2>': ['top message....', 'bottom message'],
113
##        'ssh_message': 'ssh %(user)s@%(hostname)s'
114
## }
115
##
116
## you may use the following parameters to format ssh_message:
117
##
118
## * server_id: the database pk of the vm
119
## * ip_address: the ipv4 address of the public vm nic
120
## * hostname: vm hostname
121
## * user: vm username
122
##
123
## you may assign a callable python object to the ssh_message, if so the above
124
## parameters get passed as arguments to the provided object.
125
#UI_CONNECT_PROMPT_MESSAGES = {}
126
#
127
## extend rdp file content. May be a string with format parameters similar to
128
## those used in UI_CONNECT_PROMPT_MESSAGES `ssh_message` or a callable object.
129
#UI_EXTRA_RDP_CONTENT = None
130
#
131
#
132
########################
133
## UI BEHAVIOUR SETTINGS
134
########################
135
#
136
## Whether to increase the time of recurrent requests (networks/vms update) if
137
## window loses its focus
138
#UI_DELAY_ON_BLUR = False
139
#
140
## Whether not visible vm views will update their content if vm changes
141
#UI_UPDATE_HIDDEN_VIEWS = False
142
#
143
## After how many timeouts of reccurent ajax requests to display the timeout
144
## error overlay
145
#UI_SKIP_TIMEOUTS = 1
146
#
147
## Whether UI should display error overlay for all Javascript exceptions
148
#UI_HANDLE_WINDOW_EXCEPTIONS = True
149
#
150
## A list of os names that support ssh public key assignment
151
#UI_SUPPORT_SSH_OS_LIST = ['debian', 'fedora', 'okeanos', 'ubuntu', 'kubuntu',
152
#                          'centos', 'archlinux']
153
#
154
## OS/username map to identify default user name for the specified os
155
#UI_OS_DEFAULT_USER_MAP = {
156
#    'debian':'root', 'fedora': 'root', 'okeanos': 'root',
157
#    'ubuntu': 'root', 'kubuntu': 'root', 'centos': 'root',
158
#    'windows': 'Administrator'
159
#}
160
#
161
###########################
162
## UI NETWORK VIEW SETTINGS
163
###########################
164
#
165
## Available network types for use to choose when creating a private network
166
## If only one set, no select options will be displayed
167
#UI_NETWORK_AVAILABLE_NETWORK_TYPES = {'PRIVATE_MAC_FILTERED': 'mac-filtering'}
168
#
169
## Suggested private networks to let the user choose from when creating a private
170
## network with dhcp enabled
171
#UI_NETWORK_AVAILABLE_SUBNETS = ['10.0.0.0/24', '192.168.0.0/24']
172
#
173
## UI will use this setting to find an available network subnet if user requests
174
## automatic subnet selection.
175
#UI_AUTOMATIC_NETWORK_RANGE_FORMAT = "192.168.%d.0/24"
176
#
177
## Whether to display already connected vm's to the network connect overlay
178
#UI_NETWORK_ALLOW_DUPLICATE_VM_NICS = False
179
#
180
## Whether to display destroy action on private networks that contain vms. If
181
## set to True, destroy action will only get displayed if user disconnect all
182
## virtual machines from the network.
183
#UI_NETWORK_STRICT_DESTROY = True
184
#
185
## Whether or not to group public networks nics in a single network view
186
#UI_GROUP_PUBLIC_NETWORKS = True
187
#
188
## The name of the grouped network view
189
#UI_GROUPED_PUBLIC_NETWORK_NAME = 'Internet'
190
#
191
#
192
################
193
## UI EXTENSIONS
194
################
195
#
196
## Glance images API endpoint
197
#UI_GLANCE_API_URL = '/plankton'
198
#
199
## Whether or not UI should display images from the Glance API
200
## set in UI_GLANCE_API_URL, if setting is set to False, ui will
201
## request images from Compute API
202
#UI_ENABLE_GLANCE = True
203
#
204
## a dict of image owner ids and their associate name
205
## to be displayed on images list
206
#UI_SYSTEM_IMAGES_OWNERS = {
207
#    'admin@synnefo.gr': 'system',
208
#    'images@synnefo.gr': 'system'
209
#}
210
#
b/snf-cyclades-app/conf/20-snf-cyclades-app-userdata.conf
1
## -*- coding: utf-8 -*-
2
##
3
## Userdata settings
4
####################
5
#
6
## Genetared SSH key bits length
7
#USERDATA_SSH_KEY_LENGTH = 2048
8
#
9
## Generated SSH key exponent
10
#USERDATA_SSH_KEY_EXPONENT = 65537
11
#
12
## Maximum number of ssh keys a user is allowed to have
13
#USERDATA_MAX_SSH_KEYS_PER_USER = 10
/dev/null
1
#!/bin/sh
2
#
3
# This file is a shell script to be sourced by the appropriate 
4
# init.d script
5
#
6

  
7
VERBOSE=yes
8

  
9
# Run as a daemon? true/false
10
SNF_DSPTCH_ENABLE=true
11

  
12
# User to run the dispatcher as
13
SNF_USER="www-data"
14

  
15
SNF_DSPTCH_OPTS="--workers=2"
/dev/null
1
#!/bin/sh
2

  
3
### BEGIN INIT INFO
4
# Provides:		  snf-dispatcher
5
# Required-Start:	$remote_fs $syslog
6
# Required-Stop:	 $remote_fs $syslog
7
# Default-Start:	 2 3 4 5
8
# Default-Stop:	  0 1 6
9
# Short-Description: Synnefo dispatcher daemon
10
# Description:	   Dispatcher is a daemon for the synnefo middleware logic layer
11
### END INIT INFO
12

  
13
set -e
14

  
15
# /etc/init.d/snf-dispatcher: start and stop the dispatcher daemon
16

  
17
DAEMON=/usr/bin/snf-dispatcher
18
SNF_DSPTCH_OPTS=''
19
SNF_DSPTCH_DEFAULTS_FILE=/etc/default/snf-dispatcher
20
SNF_DSPTCH_RUNDIR=/var/run/synnefo
21
SNF_DSPTCH_PID_FILE=$SNF_DSPTCH_RUNDIR/snf_dispatcher.pid
22

  
23
test -x $DAEMON || exit 0
24

  
25
. /lib/lsb/init-functions
26

  
27
if [ -s $SNF_DSPTCH_DEFAULTS_FILE ]; then
28
	. $SNF_DSPTCH_DEFAULTS_FILE
29
	SNF_DSPTCH_OPTS=$SNF_DSPTCH_OPTS" -p $SNF_DSPTCH_PID_FILE"
30
	case "x$SNF_DSPTCH_ENABLE" in
31
	xtrue|xfalse)	;;
32
	*)		log_failure_msg "Value of SNF_DSPTCH_ENABLE in $SNF_DSPTCH_DEFAULTS_FILE must be either 'true' or 'false';"
33
			log_failure_msg "not starting dispatcher daemon."
34
			exit 1
35
			;;
36
	esac
37
fi
38

  
39
export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
40

  
41
dispatcher_start() {
42
	if start-stop-daemon --start --chuid $SNF_USER --exec $DAEMON -- $SNF_DSPTCH_OPTS; then
43
		rc=0
44
		sleep 1
45
		if ! kill -0 $(cat $SNF_DSPTCH_PID_FILE) >/dev/null 2>&1; then
46
			log_failure_msg "snf-dispatcher daemon failed to start"
47
			rc=1
48
		fi
49
	else
50
		rc=1
51
	fi
52

  
53
	if [ $rc -eq 0 ]; then
54
		log_end_msg 0
55
	else
56
		log_end_msg 1
57
		rm -f $SNF_DSPTCH_PID_FILE
58
	fi
59
} # dispatcher_start
60

  
61

  
62
case "$1" in
63
  start)
64
	# Ensure the directory containing the pidfile exists
65
	# and has the right permissions
66
        mkdir -p $SNF_DSPTCH_RUNDIR
67
        chown $SNF_USER $SNF_DSPTCH_RUNDIR
68
        chmod 0755 $SNF_DSPTCH_RUNDIR
69

  
70
	if "$SNF_DSPTCH_ENABLE"; then
71
		log_daemon_msg "Starting snf-dispatcher daemon" "snf-dispatcher"
72
		if [ -s $SNF_DSPTCH_PID_FILE ] && kill -0 $(cat $SNF_DSPTCH_PID_FILE) >/dev/null 2>&1; then
73
		log_progress_msg "apparently already running"
74
		log_end_msg 0
75
		exit 0
76
		fi
77
			dispatcher_start
78
		else
79
			[ "$VERBOSE" != no ] && log_warning_msg "snf-dispatcher daemon not enabled in $SNF_DSPTCH_DEFAULTS_FILE, not starting..."
80
	fi
81
	;;
82
  stop)
83
	log_daemon_msg "Stopping snf-dispatcher daemon" "snf-dispatcher"
84
	start-stop-daemon --stop --quiet --oknodo --pidfile $SNF_DSPTCH_PID_FILE
85
	log_end_msg $?
86
	rm -f $SNF_DSPTCH_PID_FILE
87
	;;
88

  
89
  restart)
90
	set +e
91
	if $SNF_DSPTCH_ENABLE; then
92
		log_daemon_msg "Restarting dispatcher daemon" "dispatcher"
93
		if [ -s $SNF_DSPTCH_PID_FILE ] && kill -0 $(cat $SNF_DSPTCH_PID_FILE) >/dev/null 2>&1; then
94
		start-stop-daemon --stop --quiet --oknodo --pidfile $SNF_DSPTCH_PID_FILE || true
95
		sleep 1
96
		else
97
		log_warning_msg "dispatcher daemon not running, attempting to start."
98
			rm -f $SNF_DSPTCH_PID_FILE
99
		fi
100
			dispatcher_start
101
		else
102
			[ "$VERBOSE" != no ] && log_warning_msg "dispatcher daemon not enabled in $SNF_DSPTCH_DEFAULTS_FILE, not starting..."
103
	fi
104
	;;
105

  
106
  status)
107
	status_of_proc -p $SNF_DSPTCH_PID_FILE "$DAEMON" dispatcher
108
	exit $?	# notreached due to set -e
109
	;;
110
  *)
111
	echo "Usage: /etc/init.d/snf-dispatcher {start|stop|restart|status}"
112
	exit 1
113
esac
114

  
115
exit 0
116

  
b/snf-cyclades-gtools/conf/20-snf-cyclades-gtools-backend.conf
1
## snf-cyclades-gtools settings
2
#
3
#BACKEND_PREFIX_ID = "snf-"
4
#EXCHANGE_GANETI = "ganeti"
5
#
6
## List of RabbitMQ endpoints
7
#AMQP_HOSTS = ["amqp://username:password@host:port"]
8
## AMQP Backend Client. Currently only puka
9
#AMQP_BACKEND = 'puka'
/dev/null
1
#!/bin/sh
2

  
3
SNF_EVENTD_ENABLE=false
4
SNF_USER="root"
5
SNF_EVENTD_OPTS=""
/dev/null
1
#! /bin/sh
2

  
3
### BEGIN INIT INFO
4
# Provides:          snf-ganeti-eventd
5
# Required-Start:    $remote_fs $syslog ganeti
6
# Required-Stop:     $remote_fs $syslog 
7
# Default-Start:     2 3 4 5
8
# Default-Stop:      0 1 6
9
# X-Start-After:	 ganeti
10
# Short-Description: Synnefo ganeti-eventd daemon
11
# Description:       ganeti-eventd is a daemon 
12
### END INIT INFO
13

  
14
set -e
15

  
16
# /etc/init.d/snf-ganeti-eventd: start and stop the ganeti-eventd daemon
17
# script skeleton stolen from rsyncd
18

  
19

  
20
DAEMON=/usr/sbin/snf-ganeti-eventd
21
SNF_EVENTD_PID_FILE=/var/run/snf-ganeti-eventd.pid
22
SNF_EVENTD_DEFAULTS=/etc/default/snf-ganeti-eventd
23
SNF_EVENTD_OPTS=''
24
SNF_EVENTD_ENABLE=true
25
SNF_USER="root"
26

  
27
test -x $DAEMON || exit 0
28

  
29
. /lib/lsb/init-functions
30

  
31
if [ -s $SNF_EVENTD_DEFAULTS ]; then
32
    . $SNF_EVENTD_DEFAULTS
33
fi
34

  
35
export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
36

  
37
check_ganeti_master() {
38
    MASTER=`/usr/sbin/gnt-cluster getmaster`
39
    HOST=`/bin/hostname -f`
40

  
41
    if [ "x$MASTER" != x$HOST ]; then
42
        log_warning_msg "snf-ganeti-eventd should run on the ganeti master only, aborting start (use 'force-start' if you know what you are doing)"
43
        log_end_msg 0
44
        exit 0
45
    fi
46
}
47

  
48
eventd_start() {
49
    if start-stop-daemon --start --chuid $SNF_USER --pidfile $SNF_EVENTD_PID_FILE \
50
		--exec $DAEMON -- $SNF_EVENTD_OPTS
51
    then
52
        rc=0
53
        sleep 1
54
        if ! kill -0 $(cat $SNF_EVENTD_PID_FILE) >/dev/null 2>&1; then
55
            log_failure_msg "snf-ganeti-eventd daemon failed to start"
56
            rc=1
57
        fi
58
    else
59
        rc=1
60
    fi
61
    if [ $rc -eq 0 ]; then
62
        log_end_msg 0
63
    else
64
        log_end_msg 1
65
        rm -f $SNF_EVENTD_PID_FILE
66
    fi
67
} # eventd_start
68

  
69
case "$1" in
70
  start)
71
        if "$SNF_EVENTD_ENABLE"; then
72
            log_daemon_msg "Starting snf-ganeti-eventd daemon" "snf-ganeti-eventd"
73
            if [ -s $SNF_EVENTD_PID_FILE ] && kill -0 $(cat $SNF_EVENTD_PID_FILE) >/dev/null 2>&1; then
74
                log_progress_msg "apparently already running"
75
                log_end_msg 0
76
                exit 0
77
            fi
78
            # Check if we are on the Ganeti master node
79
            check_ganeti_master
80
            eventd_start
81
        else
82
            if [ -s "$SNF_EVENTD_DEFAULTS" ]; then
83
                [ "$VERBOSE" != no ] && log_warning_msg "snf-ganeti-eventd daemon not enabled in $SNF_EVENTD_DEFAULTS, not starting..."
84
            fi
85
        fi
86
        ;;
87
  force-start)
88
        if "$SNF_EVENTD_ENABLE"; then
89
            log_daemon_msg "Starting snf-ganeti-eventd daemon" "snf-ganeti-eventd"
90
        else
91
            if [ -s "$SNF_EVENTD_DEFAULTS" ]; then
92
                [ "$VERBOSE" != no ] && log_warning_msg "snf-ganeti-eventd daemon not enabled in $SNF_EVENTD_DEFAULTS, starting anyway"
93
            fi
94
        fi
95

  
96
        if [ -s $SNF_EVENTD_PID_FILE ] && kill -0 $(cat $SNF_EVENTD_PID_FILE) >/dev/null 2>&1; then
97
            log_progress_msg "apparently already running"
98
            log_end_msg 0
99
            exit 0
100
        fi
101
        eventd_start
102
        ;;
103
  stop)
104
        log_daemon_msg "Stopping snf-ganeti-eventd daemon" "snf-ganeti-eventd"
105
        start-stop-daemon --stop --quiet --oknodo --pidfile $SNF_EVENTD_PID_FILE
106
        log_end_msg $?
107
        rm -f $SNF_EVENTD_PID_FILE
108
        ;;
109
  restart)
110
        set +e
111
        if $SNF_EVENTD_ENABLE; then
112
            log_daemon_msg "Restarting snf-ganeti-eventd daemon" "snf-ganeti-eventd"
113
            if [ -s $SNF_EVENTD_PID_FILE ] && kill -0 $(cat $SNF_EVENTD_PID_FILE) >/dev/null 2>&1; then
114
                start-stop-daemon --stop --quiet --oknodo --pidfile $SNF_EVENTD_PID_FILE || true
115
                sleep 1
116
            else
117
                log_warning_msg "snf-ganeti-eventd daemon not running, attempting to start."
118
                rm -f $SNF_EVENTD_PID_FILE
119
            fi
120
            # Check if we are on the Ganeti master node, before starting
121
            check_ganeti_master
122
            eventd_start
123
        else
124
            if [ -s "$SNF_EVENTD_DEFAULTS" ]; then
125
                [ "$VERBOSE" != no ] && log_warning_msg "snf-ganeti-eventd daemon not enabled in $SNF_EVENTD_DEFAULTS, not starting..."
126
            fi
127
        fi
128
        ;;
129

  
130
  status)
131
        status_of_proc -p $SNF_EVENTD_PID_FILE "$DAEMON" ganeti-eventd
132
        exit $? # notreached due to set -e
133
        ;;
134
  *)
135
        echo "Usage: /etc/init.d/snf-ganeti-eventd {start|stop|restart|force-start|status}"
136
        exit 1
137
esac
138

  
139
exit 0
b/snf-webproject/conf/10-snf-webproject-apps.conf
1
## -*- coding: utf-8 -*-
2
#
3
## Core Django project settings
4
###################################
5
#
6
#SESSION_ENGINE = "django.contrib.sessions.backends.cached_db"
7
#
8
## List of callables that know how to import templates from various sources.
9
#TEMPLATE_LOADERS = (
10
#    'django.template.loaders.filesystem.Loader',
11
#    'django.template.loaders.app_directories.Loader',
12
#)
13
#
14
## This is a django project setting, do not change this unless you know
15
## what you're doing
16
#ROOT_URLCONF = 'synnefo.webproject.urls'
17
#
18
## Additional template dirs.
19
#TEMPLATE_DIRS = (
20
#    '/usr/share/synnefo/templates/'
21
#)
22
#
23
#LANGUAGES = (
24
#  ('en', 'English'),
25
#)
26
#
27
## Local time zone for this installation. Choices can be found here:
28
## http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
29
## although not all choices may be available on all operating systems.
30
## On Unix systems, a value of None will cause Django to use the same
31
## timezone as the operating system.
32
## If running in a Windows environment this must be set to the same as your
33
## system time zone.
34
#TIME_ZONE = 'UTC'   # Warning: The API depends on the TIME_ZONE being UTC
35
#
b/snf-webproject/conf/10-snf-webproject-database.conf
1
## Database settings
2
#####################
3
#
4
#
5
#DATABASES = {
6
#    'default': {
7
#        # Available values 'postgresql_psycopg2', 'postgresql','mysql',
8
#        # 'sqlite3' or 'oracle'
9
#        'ENGINE': 'sqlite3',
10
#
11
#         # ATTENTION: This *must* be the absolute path if using sqlite3.
12
#         # See: http://docs.djangoproject.com/en/dev/ref/settings/#name
13
#        'NAME': '/usr/share/synnefo/synnefo_database.sqlite',
14
#
15
#        'USER': '',                      # Not used with sqlite3.
16
#
17
#        'PASSWORD': '',                  # Not used with sqlite3.
18
#        # Set to empty string for localhost. Not used with sqlite3.
19
#
20
#        'HOST': '',
21
#
22
#        # Set to empty string for default. Not used with sqlite3.
23
#        'PORT': '',
24
#
25
#        # Uncomment the following lines if you use mysql database
26
#        #'OPTIONS': {
27
#        #    'init_command': 'SET storage_engine=INNODB; ' +
28
#        #        'SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED',
29
#        #}
30
#    }
31
#}
32
#
b/snf-webproject/conf/10-snf-webproject-deploy.conf
1
## Deployment settings
2
###################################
3
#
4
#DEBUG = False
5
#TEMPLATE_DEBUG = False
6
#
7
## Use secure cookie for django sessions cookie, change this if you don't plan
8
## to deploy applications using https
9
#SESSION_COOKIE_SECURE = True
10
#
11
## You should always change this setting.
12
## Make this unique, and don't share it with anybody.
13
#SECRET_KEY = 'ly6)mw6a7x%n)-e#zzk4jo6f2=uqu!1o%)2-(7lo+f9yd^k^bg'
14
#
15
## A boolean that specifies whether to use the X-Forwarded-Host header in
16
## preference to the Host header. This should only be enabled if a proxy which
17
## sets this header is in use.
18
#USE_X_FORWARDED_HOST = True
19
#
20
## Settings / cookies that should be 'cleansed'
21
#HIDDEN_SETTINGS = 'SECRET|PASSWORD|PROFANITIES_LIST|SIGNATURE|AMQP_HOSTS|PRIVATE_KEY|DB_CONNECTION'
22
#HIDDEN_COOKIES  = '_pithos2_a|token|sessionid|shibstate|shibsession|CSRF_COOKIE'
b/snf-webproject/conf/10-snf-webproject-logging.conf
1
## -*- coding: utf-8 -*-
2
##
3
## Logging configuration
4
###################################
5
#
6
#
7
#FORMATTERS = {
8
#        'simple': {
9
#            'format': '%(asctime)s [%(levelname)s] %(message)s'
10
#        },
11
#        'verbose': {
12
#            'format': '%(asctime)s [%(process)d] %(name)s %(module)s [%(levelname)s] %(message)s'
13
#        },
14
#        'django': {
15
#            'format': '[%(asctime)s] %(levelname)s %(message)s',
16
#            'datefmt': '%d/%b/%Y %H:%M:%S'
17
#        },
18
#}
19
#
20
#
21
#LOGGING_SETUP = {
22
#    'version': 1,
23
#    'disable_existing_loggers': True,
24
#
25
#    'formatters':  FORMATTERS,
26
#    'handlers': {
27
#        'null': {
28
#            'class': 'logging.NullHandler',
29
#        },
30
#        'console': {
31
#            'class': 'logging.StreamHandler',
32
#            'formatter': 'verbose'
33
#        },
34
#        'syslog': {
35
#            'class': 'logging.handlers.SysLogHandler',
36
#            'address': '/dev/log',
37
##            'address': ('localhost', 514),
38
#            'facility': 'daemon',
39
#            'formatter': 'verbose',
40
#            'level': 'INFO',
41
#        },
42
#    },
43
#
44
#    'loggers': {
45
#        '': {
46
#            'handlers': ['console'],
47
#            'level': 'INFO'
48
#        },
49
#        'synnefo': {
50
#            'handlers': ['console'],
51
#            'level': 'INFO',
52
#            'propagate': 0
53
#        },
54
#        'synnefo.admin': {
55
#            'level': 'INFO',
56
#            'propagate': 1
57
#        },
58
#        'synnefo.api': {
59
#            'level': 'INFO',
60
#            'propagate': 1
61
#        },
62
#        'synnefo.db': {
63
#            'level': 'INFO',
64
#            'propagate': 1
65
#        },
66
#        'synnefo.logic': {
67
#            'level': 'INFO',
68
#            'propagate': 1
69
#        },
70
#    }
71
#}
72
#
73
#SNF_MANAGE_LOGGING_SETUP = {
74
#    'version': 1,
75
#    'disable_existing_loggers': True,
76
#
77
#    'formatters': FORMATTERS,
78
#
79
#    'handlers': {
80
#        'console': {
81
#            'class': 'logging.StreamHandler',
82
#            'formatter': 'verbose'
83
#        },
84
#    },
85
#
86
#    'loggers': {
87
#        '': {
88
#                'handlers': ['console'],
89
#                'level': 'WARNING'
90
#            },
91
#        'synnefo': {
92
#                'handlers': ['console'],
93
#                'level': 'WARNING',
94
#                'propagate': 0
95
#        }
96
#    }
97
#}
b/snf-webproject/conf/10-snf-webproject-site.conf
1
## -*- coding: utf-8 -*-
2
##
3
## Site-specific Django conf
4
###################################
5
#
6
## Language code for this installation. All choices can be found here:
7
## http://www.i18nguy.com/unicode/language-identifiers.html
8
#LANGUAGE_CODE = 'en-us'
9
#
10
## If you set this to False, Django will make some optimizations so as not
11
## to load the internationalization machinery.
12
#USE_I18N = True
13
#
14
## If you set this to False, Django will not format dates, numbers and
15
## calendars according to the current locale
16
#USE_L10N = True
17
#
18
## Absolute path to the directory that holds media.
19
## Example: "/home/media/media.lawrence.com/"
20
#MEDIA_ROOT = '/usr/share/synnefo/static/'
21
#
22
## URL that handles the media served from MEDIA_ROOT. Make sure to use a
23
## trailing slash if there is a path component (optional in other cases).
24
## Examples: "http://media.lawrence.com", "http://example.com/media/"
25
#MEDIA_URL = '/static/'
26
#
27
#STATIC_FILES = {}

Also available in: Unified diff