Skip to content

Commit

Permalink
Test commit for checking scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
jouvin committed Nov 4, 2024
1 parent 5b15cc8 commit e558234
Show file tree
Hide file tree
Showing 25 changed files with 322 additions and 74 deletions.
5 changes: 4 additions & 1 deletion defaults/openstack/config.pan
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ variable OS_METADATA_SECRET ?= error('OS_METADATA_SECRET must be declared');

variable OS_LOGGING_TYPE ?= 'file';
variable OS_AUTH_CLIENT_CONFIG ?= 'features/keystone/client/config';
variable OS_AUTH_CLIENT_MINIMAL_CONFIG ?= 'features/keystone/client/config-minimal';

# Define the following variable with the service project ID
# Used by some services like Octavia to do some filtering
Expand Down Expand Up @@ -146,7 +147,9 @@ variable OS_NOVA_CONTROLLER_HOST ?= error('OS_NOVA_CONTROLLER_HOST must be decla
variable OS_NOVA_VNC_HOST ?= OS_NOVA_CONTROLLER_HOST;
variable OS_NOVA_CONTROLLER_PROTOCOL ?= 'http';
variable OS_NOVA_VNC_PROTOCOL ?= OS_NOVA_CONTROLLER_PROTOCOL;
variable OS_NOVA_OVERWRITE_DEFAULT_POLICY ?= false;
# OS_NOVA_COMPUTE_POLICY muste be a policy file if a non-default policy is rquired
# Policy file extension must be json or yaml
variable OS_NOVA_COMPUTE_POLICY ?= undef;
variable OS_NOVA_RESUME_VM_ON_BOOT ?= false;
variable OS_NOVA_CPU_RATIO ?= 1.0;
variable OS_NOVA_CPU_WEIGHT_MULTIPLIER ?= 1.0;
Expand Down
4 changes: 4 additions & 0 deletions features/barbican/config.pan
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
unique template features/barbican/config;

variable OS_NODE_SERVICES = append('barbican');

# Load some useful functions
include 'defaults/openstack/functions';

Expand All @@ -25,6 +27,8 @@ prefix '/software/components/metaconfig/services/{/etc/barbican/barbican.conf}';
'convert/joincomma' = true;
'convert/truefalse' = true;
'daemons/httpd' = 'restart';
# Restart memcached to ensure considtency with service configuration changes
'daemons/memcached' = 'restart';
bind '/software/components/metaconfig/services/{/etc/barbican/barbican.conf}/contents' = openstack_barbican_config;


Expand Down
4 changes: 4 additions & 0 deletions features/ceilometer/config.pan
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
unique template features/ceilometer/config;

variable OS_NODE_SERVICES = append('ceilometer');

# Load some useful functions
include 'defaults/openstack/functions';

Expand Down Expand Up @@ -28,6 +30,8 @@ prefix '/software/components/metaconfig/services/{/etc/ceilometer/ceilometer.con
'daemons/openstack-ceilometer-notification'='restart';
'daemons/openstack-ceilometer-central'='restart';
'daemons/openstack-ceilometer-collector'='restart';
# Restart memcached to ensure considtency with service configuration changes
'daemons/memcached' = 'restart';
bind '/software/components/metaconfig/services/{/etc/ceilometer/ceilometer.conf}/contents' = openstack_ceilometer_config;

# [DEFAULT] section
Expand Down
4 changes: 4 additions & 0 deletions features/cinder/config.pan
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
unique template features/cinder/config;

variable OS_NODE_SERVICES = append('cinder');

# Load some useful functions
include 'defaults/openstack/functions';

Expand Down Expand Up @@ -28,6 +30,8 @@ prefix '/software/components/metaconfig/services/{/etc/cinder/cinder.conf}';
'daemons/openstack-cinder-api' = 'restart';
'daemons/openstack-cinder-scheduler' = 'restart';
'daemons/openstack-cinder-volume' = 'restart';
# Restart memcached to ensure considtency with service configuration changes
'daemons/memcached' = 'restart';
bind '/software/components/metaconfig/services/{/etc/cinder/cinder.conf}/contents' = openstack_cinder_config;

# [DEFAULT] section
Expand Down
2 changes: 2 additions & 0 deletions features/designate/config.pan
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
unique template features/designate/config;

variable OS_NODE_SERVICES = append('designate');

include 'features/designate/rpms';
4 changes: 4 additions & 0 deletions features/glance/config.pan
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ required = no
variable OS_GLANCE_WORKERS_NUM ?= length(value('/hardware/cpu')) * value('/hardware/cpu/0/cores');


variable OS_NODE_SERVICES = append('glance');

# Load some useful functions
include 'defaults/openstack/functions';

Expand Down Expand Up @@ -46,6 +48,8 @@ prefix '/software/components/metaconfig/services/{/etc/glance/glance-api.conf}';
'convert/joincomma' = true;
'convert/truefalse' = true;
'daemons/openstack-glance-api' = 'restart';
# Restart memcached to ensure considtency with service configuration changes
'daemons/memcached' = 'restart';
bind '/software/components/metaconfig/services/{/etc/glance/glance-api.conf}/contents' = openstack_glance_api_config;

# [DEFAULT] section
Expand Down
4 changes: 4 additions & 0 deletions features/heat/config.pan
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
unique template features/heat/config;

variable OS_NODE_SERVICES = append('heat');

# Load some useful functions
include 'defaults/openstack/functions';

Expand All @@ -26,6 +28,8 @@ prefix '/software/components/metaconfig/services/{/etc/heat/heat.conf}';
'daemons/openstack-heat-api' = 'restart';
'daemons/openstack-heat-api-cfn' = 'restart';
'daemons/openstack-heat-engine' = 'restart';
# Restart memcached to ensure considtency with service configuration changes
'daemons/memcached' = 'restart';
bind '/software/components/metaconfig/services/{/etc/heat/heat.conf}/contents' = openstack_heat_config;

# DEFAULT section
Expand Down
7 changes: 7 additions & 0 deletions features/keystone/client/config-minimal.pan
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
structure template features/keystone/client/config-minimal;

'auth_url' = format('%s://%s:35357', OS_KEYSTONE_CONTROLLER_PROTOCOL, OS_KEYSTONE_CONTROLLER_HOST);
'auth_type' = OS_KEYSTONE_TOKEN_AUTH_TYPE;
'project_domain_id' = 'default';
'user_domain_id' = 'default';
'project_name' = 'service';
4 changes: 4 additions & 0 deletions features/keystone/config.pan
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
unique template features/keystone/config;

variable OS_NODE_SERVICES = append('keystone');

# Load some useful functions
include 'defaults/openstack/functions';

Expand Down Expand Up @@ -61,6 +63,8 @@ prefix '/software/components/metaconfig/services/{/etc/keystone/keystone.conf}';
'convert/joincomma' = true;
'convert/truefalse' = true;
'daemons/httpd' = 'restart';
# Restart memcached to ensure considtency with service configuration changes
'daemons/memcached' = 'restart';
bind '/software/components/metaconfig/services/{/etc/keystone/keystone.conf}/contents' = openstack_keystone_config;

# [DEFAULT] section
Expand Down
15 changes: 15 additions & 0 deletions features/magnum/config.pan
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
unique template features/magnum/config;

@desc{
desc = defines the cluster creation timeout (max time)
values = long
default = 60
required = no
}
variable OS_MAGNUM_CLUSTER_CREATION_TIMEOUT ?= 60;

variable OS_NODE_SERVICES = append('magnum');

# Load some useful functions
include 'defaults/openstack/functions';

Expand All @@ -24,6 +34,8 @@ prefix '/software/components/metaconfig/services/{/etc/magnum/magnum.conf}';
'convert/truefalse' = true;
'daemons/openstack-magnum-api' = 'restart';
'daemons/openstack-magnum-conductor' = 'restart';
# Restart memcached to ensure considtency with service configuration changes
'daemons/memcached' = 'restart';
bind '/software/components/metaconfig/services/{/etc/magnum/magnum.conf}/contents' = openstack_magnum_config;

# [DEFAULT] section
Expand All @@ -49,6 +61,9 @@ bind '/software/components/metaconfig/services/{/etc/magnum/magnum.conf}/content
# [cinder_client] section
'contents/cinder_client/region_name' = OS_REGION_NAME;

# [cluster_heat] section
'contents/cluster_heat/create_timeout' = OS_MAGNUM_CLUSTER_CREATION_TIMEOUT;

# [database] section
'contents/database/connection' = format('mysql+pymysql://%s:%s@%s/magnum', OS_MAGNUM_DB_USERNAME, OS_MAGNUM_DB_PASSWORD, OS_MAGNUM_DB_HOST);

Expand Down
3 changes: 2 additions & 1 deletion features/neutron/base.pan
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ include 'types/openstack/neutron';
include 'defaults/openstack/config';

# Install RPMs for compute part of neutron
include 'features/neutron/rpms/config';
variable OS_NEUTRON_CONFIG_ONLY ?= false;
include if ( ! OS_NEUTRON_CONFIG_ONLY ) 'features/neutron/rpms/config';

# Include variables needed to configure neutron
include 'features/neutron/variables/' + OS_NEUTRON_NETWORK_TYPE;
Expand Down
3 changes: 3 additions & 0 deletions features/neutron/compute/config.pan
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
unique template features/neutron/compute/config;

variable OS_NODE_SERVICES = append('neutron');

# Load some useful functions
include 'defaults/openstack/functions';

Expand All @@ -10,6 +12,7 @@ include 'defaults/openstack/config';
include 'features/neutron/variables/' + OS_NEUTRON_NETWORK_TYPE;

# Include some common configuration
variable OS_NEUTRON_CONFIG_ONLY = true;
include 'features/neutron/base';


Expand Down
33 changes: 31 additions & 2 deletions features/neutron/controller/config.pan
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,41 @@ required = no
variable OS_NEUTRON_RESTART_ON_CONFIG_CHANGE ?= true;


variable OS_NODE_SERVICES = append('neutron');

# Load Neutron base configuration
include 'features/neutron/base';

# Include common server configuration
include 'features/neutron/server';

# Load Neutron server policy
include 'features/neutron/controller/policy/config';
# Include policy file if OS_NEUTRON_POLICY is defined
@{
desc = file to load as the policy file. File extension is used to determine the policy file extension
values = path relative to include paths
default = undef
requied = no
}
variable OS_NEUTRON_POLICY ?= undef;
include 'components/filecopy/config';
'/software/components/filecopy/services' = {
if ( is_defined(OS_NEUTRON_POLICY) ) {
toks = matches(OS_NEUTRON_POLICY, '.*\.(json|yaml)$');
if ( length(toks) < 2 ) {
error('OS_NEUTRON_POLICY must be a file name with the extension .json or .yaml');
};
policy_file = format('/etc/neutron/policy.%s', toks[1]);
SELF[escape(policy_file)] = dict(
'config', file_contents(OS_NEUTRON_POLICY),
'owner', 'root',
'perms', '0644',
'backup', true,
);
};

SELF;
};


# neutron.conf
include 'components/metaconfig/config';
Expand All @@ -26,6 +53,8 @@ prefix '/software/components/metaconfig/services/{/etc/neutron/neutron.conf}';
} else {
null
};
# Restart memcached to ensure considtency with service configuration changes
'daemons/memcached' = 'restart';
bind '/software/components/metaconfig/services/{/etc/neutron/neutron.conf}/contents' = openstack_neutron_server_config;

# [DEFAULT]
Expand Down
9 changes: 8 additions & 1 deletion features/neutron/mechanism/linuxbridge.pan
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
template features/neutron/mechanism/linuxbridge;

'/software/packages' = pkg_repl('openstack-neutron-linuxbridge');
'/software/packages' = {
pkg_repl('openstack-neutron-linuxbridge');
# contrack-tools is an undeclared openstack-neutron-linuxbridge dependency,
# declared as required by openstack-neutron
pkg_repl('conntrack-tools');

SELF;
};

include 'features/neutron/agents/linuxbridge_agent';

Expand Down
11 changes: 6 additions & 5 deletions features/neutron/rpms/config.pan
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
unique template features/neutron/rpms/config;

prefix '/software/packages';
'{openstack-neutron}' ?= dict();
'{python3-neutronclient}' ?= dict();
'{ebtables}' ?= dict();
'{ipset}' ?= dict();
'/software/packages' = {
pkg_repl('openstack-neutron');
pkg_repl('python3-neutronclient');

SELF;
};
46 changes: 46 additions & 0 deletions features/nova/common/config.pan
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
unique template features/nova/common/config;

prefix '/software/components/metaconfig/services/{/etc/nova/nova.conf}';

# [DEFAULT] section
'contents/DEFAULT' = openstack_load_config('features/openstack/base');
'contents/DEFAULT' = openstack_load_config('features/openstack/logging/' + OS_LOGGING_TYPE);

# [keystone_authtoken] section
'contents/keystone_authtoken' = openstack_load_config(OS_AUTH_CLIENT_CONFIG);
'contents/keystone_authtoken/username' = OS_NOVA_USERNAME;
'contents/keystone_authtoken/password' = OS_NOVA_PASSWORD;

# [neutron] section
'contents/neutron' = openstack_load_config(OS_AUTH_CLIENT_MINIMAL_CONFIG);
'contents/neutron/password' = OS_NEUTRON_PASSWORD;
'contents/neutron/region_name' = OS_REGION_NAME;
'contents/neutron/username' = OS_NEUTRON_USERNAME;

# [oslo_concurrency]
'contents/oslo_concurrency/lock_path' = '/var/lib/nova/tmp';

#[oslo_messaging_rabbit] section
'contents/oslo_messaging_rabbit' = openstack_load_config('features/rabbitmq/openstack/client/base');

# |service_user] section
'contents/service_user' = openstack_load_config(OS_AUTH_CLIENT_MINIMAL_CONFIG);
'contents/service_user/send_service_user_token' = true;
'contents/service_user/username' = OS_NOVA_USERNAME;
'contents/service_user/password' = OS_NOVA_PASSWORD;

# [upgrade_levels] section
# Require OS_NOVA_UPGRADE_LEVELS to be <= to current server version
'contents/upgrade_levels' = if ( is_defined(OS_NOVA_UPGRADE_LEVELS) ) {
if ( OS_NOVA_UPGRADE_LEVELS <= OPENSTACK_VERSION_NAME ) {
dict('compute', OS_NOVA_UPGRADE_LEVELS);
} else {
error(
"OS_NOVA_UPGRADE_LEVELS (%s) must be less or equal to current OpenStack version (%s)",
OS_NOVA_UPGRADE_LEVELS,
OPENSTACK_VERSION_NAME,
);
};
} else {
null;
};
Loading

0 comments on commit e558234

Please sign in to comment.