summaryrefslogtreecommitdiffstats
path: root/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2017-06-09 03:19:04 +0300
committerMichael Lando <ml636r@att.com>2017-06-09 03:19:04 +0300
commited64b5edff15e702493df21aa3230b81593e6133 (patch)
treea4cb01fdaccc34930a8db403a3097c0d1e40914b /sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates
parent280f8015d06af1f41a3ef12e8300801c7a5e0d54 (diff)
[SDC-29] catalog 1707 rebase commit.
Change-Id: I43c3dc5cf44abf5da817649bc738938a3e8388c1 Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates')
-rw-r--r--sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates/default/configuration.yaml.erb154
-rw-r--r--sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates/default/create_dox_keyspace.sh.erb105
-rw-r--r--sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates/default/titan.properties.erb25
3 files changed, 203 insertions, 81 deletions
diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates/default/configuration.yaml.erb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates/default/configuration.yaml.erb
index e33ece4890..4d5f979f56 100644
--- a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates/default/configuration.yaml.erb
+++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates/default/configuration.yaml.erb
@@ -22,8 +22,9 @@ beProtocol: http
beSslPort: <%= @ssl_port %>
version: 1.0
released: 2012-11-30
+toscaConformanceLevel: 3.0
-titanCfgFile: /var/lib/jetty/config/catalog-be/titan.properties
+titanCfgFile: <%= @titan_Path %>/titan.properties
titanInMemoryGraph: false
titanLockTimeout: 1800
# The interval to try and reconnect to titan DB when it is down during ASDC startup:
@@ -43,6 +44,21 @@ protocols:
- http
- https
+# Default imports
+defaultImports:
+ - nodes:
+ file: nodes.yml
+ - datatypes:
+ file: data.yml
+ - capabilities:
+ file: capabilities.yml
+ - relationships:
+ file: relationships.yml
+ - groups:
+ file: groups.yml
+ - policies:
+ file: policies.yml
+
# Users
users:
tom: passwd
@@ -60,10 +76,10 @@ cassandraConfig:
truststorePath : /config/.truststore
truststorePassword : Aa123456
keySpaces:
- - { name: dox, replicationStrategy: NetworkTopologyStrategy, replicationInfo: ['<%= @dc1 %>','<%= @rep_factor %>']}
- - { name: sdcaudit, replicationStrategy: NetworkTopologyStrategy, replicationInfo: ['<%= @dc1 %>','<%= @rep_factor %>']}
- - { name: sdcartifact, replicationStrategy: NetworkTopologyStrategy, replicationInfo: ['<%= @dc1 %>','<%= @rep_factor %>']}
- - { name: sdccomponent, replicationStrategy: NetworkTopologyStrategy, replicationInfo: ['<%= @dc1 %>','<%= @rep_factor %>']}
+ - { name: dox, replicationStrategy: NetworkTopologyStrategy, replicationInfo: ['<%= @DC_NAME %>','<%= @rep_factor %>']}
+ - { name: sdcaudit, replicationStrategy: NetworkTopologyStrategy, replicationInfo: ['<%= @DC_NAME %>','<%= @rep_factor %>']}
+ - { name: sdcartifact, replicationStrategy: NetworkTopologyStrategy, replicationInfo: ['<%= @DC_NAME %>','<%= @rep_factor %>']}
+ - { name: sdccomponent, replicationStrategy: NetworkTopologyStrategy, replicationInfo: ['<%= @DC_NAME %>','<%= @rep_factor %>']}
#Application-specific settings of ES
elasticSearch:
@@ -106,7 +122,9 @@ artifactTypes:
- AAI_VF_MODULE_MODEL
- AAI_VF_INSTANCE_MODEL
- OTHER
-
+ - SNMP_POLL
+ - SNMP_TRAP
+ - GUIDE
licenseTypes:
- User
@@ -119,6 +137,8 @@ resourceTypes: &allResourceTypes
- CP
- VL
- VF
+ - VFCMT
+ - Abstract
# validForResourceTypes usage
# validForResourceTypes:
@@ -133,6 +153,11 @@ deploymentResourceInstanceArtifacts:
type: HEAT_ENV
description: "Auto-generated HEAT Environment deployment artifact"
fileExtension: "env"
+ VfHeatEnv:
+ displayName: "VF HEAT ENV"
+ type: HEAT_ENV
+ description: "VF Auto-generated HEAT Environment deployment artifact"
+ fileExtension: "env"
#tosca artifacts placeholders
toscaArtifacts:
@@ -163,7 +188,7 @@ informationalResourceArtifacts:
testScripts:
displayName: Test Scripts
type: OTHER
- cloudQuestionnaire:
+ CloudQuestionnaire:
displayName: Cloud Questionnaire (completed)
type: OTHER
HEATTemplateFromVendor:
@@ -319,36 +344,55 @@ resourceDeploymentArtifacts:
acceptedTypes:
- xml
validForResourceTypes: *allResourceTypes
+ LIFECYCLE_OPERATIONS:
+ acceptedTypes:
+ - yaml
+ - yml
+ validForResourceTypes:
+ - VF
+ - VFC
+ VES_EVENTS:
+ acceptedTypes:
+ - yaml
+ - yml
+ validForResourceTypes: *allResourceTypes
+ PERFORMANCE_COUNTER:
+ acceptedTypes:
+ - csv
+ validForResourceTypes: *allResourceTypes
APPC_CONFIG:
acceptedTypes:
validForResourceTypes:
- VF
- #DCAE Artifacts
DCAE_TOSCA:
acceptedTypes:
- yml
- yaml
validForResourceTypes:
- VF
+ - VFCMT
DCAE_JSON:
acceptedTypes:
- json
validForResourceTypes:
- VF
+ - VFCMT
DCAE_POLICY:
acceptedTypes:
- emf
validForResourceTypes:
- VF
+ - VFCMT
DCAE_DOC:
acceptedTypes:
validForResourceTypes:
- - VF
+ - VF
+ - VFCMT
DCAE_EVENT:
acceptedTypes:
validForResourceTypes:
- VF
-#AAI Artifacts
+ - VFCMT
AAI_VF_MODEL:
acceptedTypes:
- xml
@@ -362,6 +406,12 @@ resourceDeploymentArtifacts:
OTHER:
acceptedTypes:
validForResourceTypes: *allResourceTypes
+ SNMP_POLL:
+ acceptedTypes:
+ validForResourceTypes: *allResourceTypes
+ SNMP_TRAP:
+ acceptedTypes:
+ validForResourceTypes: *allResourceTypes
resourceInstanceDeploymentArtifacts:
HEAT_ENV:
@@ -370,7 +420,13 @@ resourceInstanceDeploymentArtifacts:
VF_MODULES_METADATA:
acceptedTypes:
- json
-#DCAE_VF Instance Artifacts
+ VES_EVENTS:
+ acceptedTypes:
+ - yaml
+ - yml
+ PERFORMANCE_COUNTER:
+ acceptedTypes:
+ - csv
DCAE_INVENTORY_TOSCA:
acceptedTypes:
- yml
@@ -387,6 +443,56 @@ resourceInstanceDeploymentArtifacts:
acceptedTypes:
DCAE_INVENTORY_EVENT:
acceptedTypes:
+ SNMP_POLL:
+ acceptedTypes:
+ validForResourceTypes: *allResourceTypes
+ SNMP_TRAP:
+ acceptedTypes:
+ validForResourceTypes: *allResourceTypes
+
+resourceInformationalArtifacts:
+ CHEF:
+ acceptedTypes:
+ validForResourceTypes: *allResourceTypes
+ PUPPET:
+ acceptedTypes:
+ validForResourceTypes: *allResourceTypes
+ SHELL:
+ acceptedTypes:
+ validForResourceTypes: *allResourceTypes
+ YANG:
+ acceptedTypes:
+ validForResourceTypes: *allResourceTypes
+ YANG_XML:
+ acceptedTypes:
+ validForResourceTypes: *allResourceTypes
+ HEAT:
+ acceptedTypes:
+ validForResourceTypes: *allResourceTypes
+ BPEL:
+ acceptedTypes:
+ validForResourceTypes: *allResourceTypes
+ DG_XML:
+ acceptedTypes:
+ validForResourceTypes: *allResourceTypes
+ MURANO_PKG:
+ acceptedTypes:
+ validForResourceTypes: *allResourceTypes
+ OTHER:
+ acceptedTypes:
+ validForResourceTypes: *allResourceTypes
+ SNMP_POLL:
+ acceptedTypes:
+ validForResourceTypes: *allResourceTypes
+ SNMP_TRAP:
+ acceptedTypes:
+ validForResourceTypes: *allResourceTypes
+ GUIDE:
+ acceptedTypes:
+ validForResourceTypes:
+ - VF
+ - VFC
+
resourceInformationalDeployedArtifacts:
@@ -405,10 +511,8 @@ cleanComponentsConfiguration:
artifactsIndex: resources
-heatEnvArtifactHeader:
- ""
-heatEnvArtifactFooter:
- ""
+heatEnvArtifactHeader: ""
+heatEnvArtifactFooter: ""
onboarding:
protocol: http
@@ -454,6 +558,24 @@ applicationL2Cache:
numberOfCacheWorkers: 4
toscaValidators:
- stringMaxLength: 65536
+ stringMaxLength: 2500
disableAudit: false
+vfModuleProperties:
+ min_vf_module_instances:
+ forBaseModule: 1
+ forNonBaseModule: 0
+ max_vf_module_instances:
+ forBaseModule: 1
+ forNonBaseModule:
+ initial_count:
+ forBaseModule: 1
+ forNonBaseModule: 0
+ vf_module_type:
+ forBaseModule: Base
+ forNonBaseModule: Expansion
+
+genericAssetNodeTypes:
+ VFC: org.openecomp.resource.abstract.nodes.VFC
+ VF : org.openecomp.resource.abstract.nodes.VF
+ Service: org.openecomp.resource.abstract.nodes.service \ No newline at end of file
diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates/default/create_dox_keyspace.sh.erb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates/default/create_dox_keyspace.sh.erb
index 701d320b67..da6bbb184c 100644
--- a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates/default/create_dox_keyspace.sh.erb
+++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates/default/create_dox_keyspace.sh.erb
@@ -1,77 +1,52 @@
#!/bin/bash
-CASSANDRA_USER=cassandra
-CASSANDRA_PASS=Aa1234%^!
-CASSANDRA_IP=<%= @cassandra_ip %>
+CASSANDRA_USER=asdc_user
+CASSANDRA_PASS='Aa1234%^!'
-REPLICATION_FACTOR=1
-KEYSPACE="CREATE KEYSPACE IF NOT EXISTS dox WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : $REPLICATION_FACTOR };"
+KEYSPACE="CREATE KEYSPACE IF NOT EXISTS dox WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', '<%= @DC_NAME %>': '1'};"
+KEYSPACE1="CREATE KEYSPACE IF NOT EXISTS zusammen_dox WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', '<%= @DC_NAME %>': '1'};"
-keyspaces=`echo "describe keyspaces" | cqlsh -u $CASSANDRA_USER -p $CASSANDRA_PASS $CASSANDRA_IP 2>/dev/null`
-if [ "$keyspaces" == "" ] ; then
- echo "keyspace is empty, probably connection error. Exit..."
- exit 1
-fi
-
-echo "run create_dox_db.cql"
-echo $KEYSPACE > /tmp/create_dox_db.cql
-cat <<'EOF' >> /tmp/create_dox_db.cql
-USE dox;
-CREATE TYPE IF NOT EXISTS version (major int, minor int);
-CREATE TYPE IF NOT EXISTS user_candidate_version (version frozen<version>, user text);
-CREATE TABLE IF NOT EXISTS version_info (entity_type text, entity_id text, active_version frozen<version>, status text, candidate frozen<user_candidate_version>, viewable_versions set<frozen<version>>, latest_final_version frozen<version>, PRIMARY KEY (entity_type, entity_id));
-CREATE TABLE IF NOT EXISTS version_info_deleted (entity_type text, entity_id text, active_version frozen<version>, status text, candidate frozen<user_candidate_version>, viewable_versions set<frozen<version>>, latest_final_version frozen<version>, PRIMARY KEY (entity_type, entity_id));
-CREATE TABLE IF NOT EXISTS unique_value (type text, value text, PRIMARY KEY ((type, value)));
-CREATE TYPE IF NOT EXISTS choice_or_other (result text);
-CREATE TYPE IF NOT EXISTS multi_choice_or_other (results set<text>);
-CREATE TABLE IF NOT EXISTS vendor_license_model (vlm_id text, version frozen<version>, vendor_name text, description text, icon text, PRIMARY KEY ((vlm_id, version)));
-CREATE TABLE IF NOT EXISTS license_agreement (vlm_id text, version frozen<version>, la_id text, name text, description text, lic_term frozen<choice_or_other>, req_const text, fg_ids set<text>, PRIMARY KEY ((vlm_id, version), la_id));
-CREATE TABLE IF NOT EXISTS feature_group (vlm_id text, version frozen<version>, fg_id text, name text, description text, part_num text, ep_ids set<text>, lkg_ids set<text>, ref_la_ids set<text>, PRIMARY KEY ((vlm_id, version), fg_id));
-CREATE TABLE IF NOT EXISTS license_key_group (vlm_id text, version frozen<version>, lkg_id text,name text,description text, type text, operational_scope frozen<multi_choice_or_other>, ref_fg_ids set<text>,version_uuid text,PRIMARY KEY ((vlm_id, version), lkg_id));
-CREATE TABLE IF NOT EXISTS entitlement_pool (vlm_id text, version frozen<version>, ep_id text,name text,description text,threshold float,threshold_unit text,entitlement_metric frozen<choice_or_other>,increments text,aggregation_func frozen<choice_or_other>, operational_scope frozen<multi_choice_or_other>, time frozen<choice_or_other>,manufacturer_ref_num text,ref_fg_ids set<text>,version_uuid text,PRIMARY KEY ((vlm_id, version), ep_id));
-CREATE TABLE IF NOT EXISTS vsp_information (VSP_ID text, version frozen<version>,NAME text,DESCRIPTION text,CATEGORY text,SUB_CATEGORY text,ICON text,PACKAGE_NAME text,PACKAGE_VERSION text,vendor_name text, vendor_id text,LICENSE_AGREEMENT text,FEATURE_GROUPS list<text>,VALIDATION_DATA text,CONTENT_DATA blob, questionnaire_data text, vlm_version frozen<version>, PRIMARY KEY ((VSP_ID, version)));
-CREATE TABLE IF NOT EXISTS package_details (VSP_ID text, version frozen<version>,DISPLAY_NAME text,vsp_name text,vsp_description text,VENDOR_NAME text,CATEGORY text,SUB_CATEGORY text,VENDOR_RELEASE text,PACKAGE_CHECKSUM text,PACKAGE_TYPE text,TRANSLATE_CONTENT blob,PRIMARY KEY ((VSP_ID, version)));
-CREATE TABLE IF NOT EXISTS vsp_network (vsp_id text, version frozen<version>, network_id text, composition_data text, questionnaire_data text, PRIMARY KEY ((vsp_id, version), network_id));
-CREATE TABLE IF NOT EXISTS vsp_component (vsp_id text, version frozen<version>, component_id text, composition_data text, questionnaire_data text, PRIMARY KEY ((vsp_id, version), component_id));
-CREATE TABLE IF NOT EXISTS vsp_component_nic (vsp_id text, version frozen<version>, component_id text, nic_id text, composition_data text, questionnaire_data text, PRIMARY KEY ((vsp_id, version), component_id, nic_id));
-CREATE TABLE IF NOT EXISTS vsp_process (vsp_id text, version frozen<version>, component_id text, process_id text, name text, description text, artifact_name text, artifact blob, PRIMARY KEY ((vsp_id, version), component_id, process_id));
-CREATE TABLE IF NOT EXISTS vsp_service_artifact (vsp_id text, version frozen<version>, name text, content_data blob, PRIMARY KEY ((vsp_id, version), name));
-CREATE TABLE IF NOT EXISTS vsp_service_template (vsp_id text, version frozen<version>, base_name text static, name text, content_data blob, PRIMARY KEY ((vsp_id, version), name));
-CREATE TABLE IF NOT EXISTS vsp_enriched_service_template (vsp_id text, version frozen<version>, base_name text static, name text, content_data blob, PRIMARY KEY ((vsp_id, version), name));
-CREATE TABLE IF NOT EXISTS vsp_enriched_service_artifact (vsp_id text, version frozen<version>, name text, content_data blob, PRIMARY KEY ((vsp_id, version), name));
-CREATE TABLE IF NOT EXISTS application_config (namespace text, key text, value text, PRIMARY KEY (namespace, key));
-CREATE TABLE IF NOT EXISTS dox.Action (actionUUID text, actionInvariantUUID text, version frozen<version>, status text, name text, vendor_list set<text>, category_list set<text>, timestamp timestamp, user text, supportedModels set<text>, supportedComponents set<text>, data text, PRIMARY KEY ((actionInvariantUUID, version)));
-CREATE INDEX IF NOT EXISTS action_supportedComponents ON dox.Action (supportedComponents);
-CREATE INDEX IF NOT EXISTS action_category_list ON dox.Action (category_list);
-CREATE INDEX IF NOT EXISTS action_supportedModels ON dox.Action (supportedModels);
-CREATE INDEX IF NOT EXISTS action_vendor_list ON dox.Action (vendor_list);
-CREATE INDEX IF NOT EXISTS action_actionUUID ON dox.Action (actionUUID);
-CREATE TABLE IF NOT EXISTS dox.ecompcomponent(id text PRIMARY KEY, name text);
-CREATE TABLE IF NOT EXISTS vsp_component_artifact (vsp_id text, version frozen<version>, component_id text, artifact_type text, artifact_id text, name text, description text, artifact blob, PRIMARY KEY ((vsp_id, version), component_id, artifact_type, artifact_id));
-CREATE INDEX IF NOT EXISTS action_name ON dox.Action (name);
-CREATE TABLE IF NOT EXISTS action_artifact(artifactuuid text, effective_version int, artifact blob, PRIMARY KEY(artifactuuid, effective_version)) WITH CLUSTERING ORDER BY (effective_version DESC);
-INSERT INTO application_config (namespace,key,value) VALUES ('vsp.schemaTemplates', 'composition.component', '{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "name": { "type": "string"<#if !manual>, "enum": [ "${component.name}" ], "default": "${component.name}"</#if> }, "displayName": { "type": "string"<#if !manual && component.displayName??>, "enum": [ "${component.displayName}" ], "default": "${component.displayName}"</#if> }, "description": { "type": "string" } }, "additionalProperties": false, "required": [ "name"<#if !manual && component.displayName??>, "displayName"</#if> ] }');
-INSERT INTO application_config (namespace,key,value) VALUES ('vsp.schemaTemplates', 'composition.network', '{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "name": { "type": "string"<#if !manual>, "enum": [ "${network.name}" ], "default": "${network.name}"</#if> }, "dhcp": { "type": "boolean"<#if !manual>, "enum": [ ${network.dhcp?c} ], "default": ${network.dhcp?c}</#if> } }, "additionalProperties": false, "required": [ "name", "dhcp" ] }');
-INSERT INTO application_config (namespace,key,value) VALUES ('vsp.schemaTemplates', 'composition.nic', '{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "name": { "type": "string"<#if !manual>, "enum": [ "${nic.name}" ], "default": "${nic.name}" </#if> }, "description": { "type": "string" }<#if !manual><#if nic.networkId??>, "networkId": { "type": "string", "enum": [ "${nic.networkId}" ], "default": "${nic.networkId}" } </#if><#else>, "networkId": { "type": "string", "enum": [<#list networkIds as networkId> "${networkId}"<#sep>,</#list> ] } </#if> }, "additionalProperties": false, "required": [ "name" ] }');
-INSERT INTO application_config (namespace,key,value) VALUES ('vsp.schemaTemplates', 'questionnaire.component', '{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "general": { "type": "object", "properties": { "hypervisor": { "type": "object", "properties": { "hypervisor": { "type": "string", "enum": [ "KVM", "VMWare ESXi" ], "default": "KVM" }, "drivers": { "type": "string", "maxLength": 300, "pattern": "^[A-Za-z0-9_,-]*$" }, "containerFeaturesDescription": { "type": "string", "maxLength": 1000, "pattern": "^[A-Za-z0-9_, -]*$" } }, "additionalProperties": false }, "image": { "type": "object", "properties": { "format": { "type": "string", "enum": [ "aki", "ami", "ari", "iso", "qcow2", "raw", "vdi", "vhd", "vmdk" ], "default": "qcow2" }, "providedBy": { "type": "string", "enum": [ "OPENECOMP", "Vendor" ], "default": "OPENECOMP" }, "bootDiskSizePerVM": { "type": "number", "maximum": 100 }, "ephemeralDiskSizePerVM": { "type": "number", "maximum": 400 } }, "additionalProperties": false }, "recovery": { "type": "object", "properties": { "pointObjective": { "type": "number", "minimum": 0, "exclusiveMinimum": true, "maximum": 15, "exclusiveMaximum ": true }, "timeObjective": { "type": "number", "minimum": 0, "exclusiveMinimum": true, "maximum": 300, "exclusiveMaximum ": true }, "vmProcessFailuresHandling": { "type": "string" } }, "additionalProperties": false }, "dnsConfiguration": { "type": "string" }, "vmCloneUsage": { "type": "string", "maximum": 300 } }, "additionalProperties": false }, "compute": { "type": "object", "properties": { "vmSizing": { "type": "object", "properties": { "numOfCPUs": { "type": "number", "minimum": 0, "exclusiveMinimum": true, "maximum": 16, "default": 2 }, "fileSystemSizeGB": { "type": "number", "minimum": 0, "exclusiveMinimum": true, "default": 5 }, "persistentStorageVolumeSize": { "type": "number", "minimum": 0, "exclusiveMinimum": true }, "IOOperationsPerSec": { "type": "number", "minimum": 0, "exclusiveMinimum": true } }, "additionalProperties": false }, "numOfVMs": { "type": "object", "properties": { "minimum": { "type": "number", "minimum": 0, "exclusiveMinimum": true, "maximum": 100 }, "maximum": { "type": "number", "minimum": <#if (componentQuestionnaireData.compute.numOfVMs.minimum)?? && (componentQuestionnaireData.compute.numOfVMs.minimum)?is_number && ((componentQuestionnaireData.compute.numOfVMs.minimum) > 0 && (componentQuestionnaireData.compute.numOfVMs.minimum) <= 100)> ${componentQuestionnaireData.compute.numOfVMs.minimum}<#else> 0</#if>, "exclusiveMinimum": true, "maximum": 100 }, "CpuOverSubscriptionRatio": { "type": "string", "enum": [ "1:1", "4:1", "16:1" ], "default": "4:1" }, "MemoryRAM": { "type": "string", "enum": [ "2 GB", "4 GB", "8 GB" ], "default": "2 GB" } }, "additionalProperties": false }, "guestOS": { "type": "object", "properties": { "name": { "type": "string", "maxLength": 50 }, "bitSize": { "type": "number", "enum": [ 64, 32 ], "default": 64 }, "tools": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, "highAvailabilityAndLoadBalancing": { "type": "object", "properties": { "failureLoadDistribution": { "type": "string", "maxLength": 1000 }, "nkModelImplementation": { "type": "string", "maxLength": 1000 }, "architectureChoice": { "type": "string", "maxLength": 1000 }, "slaRequirements": { "type": "string", "maxLength": 1000 }, "horizontalScaling": { "type": "string", "maxLength": 1000 }, "loadDistributionMechanism": { "type": "string", "maxLength": 1000 } }, "additionalProperties": false }, "network": { "type": "object", "properties": { "networkCapacity": { "type": "object", "properties": { "protocolWithHighestTrafficProfileAcrossAllNICs": { "type": "string", "enum": [ "TCP", "UDP", "SCTP", "IPsec" ] }, "networkTransactionsPerSecond": { "type": "number" } }, "additionalProperties": false } }, "additionalProperties": false }, "storage": { "type": "object", "properties": { "backup": { "type": "object", "properties": { "backupType": { "type": "string", "enum": [ "On Site", "Off Site" ], "default": "On Site" }, "backupStorageSize": { "type": "number" }, "backupSolution": { "type": "string" }, "backupNIC": { "type": "string", "enum": [<#if nicNames??><#list nicNames as nicName> "${nicName}"<#sep>,</#list></#if> ] } }, "additionalProperties": false }, "snapshotBackup": { "type": "object", "properties": { "snapshotFrequency": { "type": "number", "default": 24, "minimum": 1, "exclusiveMinimum": true } }, "additionalProperties": false }, "logBackup": { "type": "object", "properties": { "sizeOfLogFiles": { "type": "number", "maximum": 5, "exclusiveMaximum": true }, "logBackupFrequency": { "type": "number", "maximum": 4, "exclusiveMaximum": true }, "logRetentionPeriod": { "type": "number", "maximum": 15, "exclusiveMaximum": true }, "logFileLocation": { "type": "string", "maxLength": 300 } }, "additionalProperties": false } }, "additionalProperties": false } }, "additionalProperties": false }');
-INSERT INTO application_config (namespace,key,value) VALUES ('vsp.schemaTemplates', 'questionnaire.nic', '{ "$schema": "http://json-schema.org/draft-04/schema#", "definitions": { "protocol": { "type": "string", "enum": [ "TCP", "UDP", "SCTP", "IPsec" ] } }, "type": "object", "properties": { "protocols": { "type": "object", "properties": { "protocols": { "type": "array", "items": { "$ref": "#/definitions/protocol" }, "minItems": 1 }, "protocolWithHighestTrafficProfile": { "$ref": "#/definitions/protocol" } }, "additionalProperties": false }, "ipConfiguration": { "type": "object", "properties": { "ipv4Required": { "type": "boolean", "default": true }, "ipv6Required": { "type": "boolean", "default": false } }, "additionalProperties": false }, "network": { "type": "object", "properties": { "networkDescription": { "type": "string", "pattern": "[A-Za-z]+", "maxLength": 300 } }, "additionalProperties": false }, "sizing": { "type": "object", "definitions": { "peakAndAvg": { "type": "object", "properties": { "peak": { "type": "number" }, "avg": { "type": "number" } }, "additionalProperties": false }, "packetsAndBytes": { "type": "object", "properties": { "packets": { "$ref": "#/properties/sizing/definitions/peakAndAvg" }, "bytes": { "$ref": "#/properties/sizing/definitions/peakAndAvg" } }, "additionalProperties": false } }, "properties": { "describeQualityOfService": { "type": "string" }, "inflowTrafficPerSecond": { "$ref": "#/properties/sizing/definitions/packetsAndBytes" }, "outflowTrafficPerSecond": { "$ref": "#/properties/sizing/definitions/packetsAndBytes" }, "flowLength": { "$ref": "#/properties/sizing/definitions/packetsAndBytes" }, "acceptableJitter": { "type": "object", "properties": { "mean": { "type": "number" }, "max": { "type": "number" }, "variable": { "type": "number" } }, "additionalProperties": false }, "acceptablePacketLoss": { "type": "number", "minimum": 0, "maximum": 100 } }, "additionalProperties": false } }, "additionalProperties": false }');
-INSERT INTO application_config (namespace,key,value) VALUES ('vsp.schemaTemplates', 'questionnaire.vsp', '{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "general": { "type": "object", "properties": { "affinityData": { "type": "string", "enum": [ "Affinity", "Anti Affinity", "None" ] }, "availability": { "type": "object", "properties": { "useAvailabilityZonesForHighAvailability": { "type": "boolean", "default": false } }, "additionalProperties": false }, "regionsData": { "type": "object", "properties": { "multiRegion": { "type": "boolean", "default": false }, "regions": { "type": "array", "items": { "type": "string", "enum": [ "Alphareta", "Birmingham", "Dallas", "Fairfield CA", "Hayward CA", "Lisle", "Mission", "San Diego", "Secaucus" ] } } }, "additionalProperties": false }, "storageDataReplication": { "type": "object", "properties": { "storageReplicationAcrossRegion": { "type": "boolean", "default": false }, "storageReplicationSize": { "type": "number", "maximum": 100, "exclusiveMaximum": true }, "storageReplicationFrequency": { "type": "number", "minimum": 5 }, "storageReplicationSource": { "type": "string", "maxLength": 300 }, "storageReplicationDestination": { "type": "string", "maxLength": 300 } }, "additionalProperties": false } }, "additionalProperties": false } }, "additionalProperties": false }');
-INSERT INTO application_config (namespace,key,value) VALUES ('vsp.monitoring', 'component.ceilometer', '{ "ceilometerInfoList": [ { "name": "instance", "type": "Gauge", "unit": "instance", "category": "compute", "description": "Existence of instance" }, { "name": "instance:type", "type": "Gauge", "unit": "instance", "category": "compute", "description": "Existence of instance <type> (OpenStack types)" }, { "name": "memory", "type": "Gauge", "unit": "MB", "category": "compute", "description": "Volume of RAM allocated to the instance" }, { "name": "memory.usage", "type": "Gauge", "unit": "MB", "category": "compute", "description": "Volume of RAM used by the instance from the amount of its allocated memory" }, { "name": "memory.resident", "type": "Gauge", "unit": "MB", "category": "compute", "description": "Volume of RAM used by the instance on the physical machine" }, { "name": "cpu", "type": "Cumulative", "unit": "ns", "category": "compute", "description": "CPU time used" }, { "name": "cpu_util", "type": "Gauge", "unit": "%", "category": "compute", "description": "Average CPU utilization" }, { "name": "cpu.delta", "type": "Delta", "unit": "ns", "category": "compute", "description": "CPU time used since previous datapoint" }, { "name": "vcpus", "type": "Gauge", "unit": "ms", "category": "compute", "description": "Average disk latency" } ] }');
-ALTER TABLE vsp_information ADD questionnaire_data text;
-ALTER TABLE vsp_information ADD vlm_version frozen<version>;
-ALTER TABLE entitlement_pool ADD version_uuid text;
-ALTER TABLE license_key_group ADD version_uuid text;
-
-EOF
+echo "run create_dox_keyspace.cql"
+echo -e "$KEYSPACE\n$KEYSPACE1" > /tmp/create_dox_keyspace.cql
-chmod 777 /tmp/create_dox_db.cql
-cqlsh -u $CASSANDRA_USER -p $CASSANDRA_PASS $CASSANDRA_IP -f /tmp/create_dox_db.cql > /dev/null 2>&1
+chmod 755 /tmp/create_dox_keyspace.cql
+cqlsh -u $CASSANDRA_USER -p $CASSANDRA_PASS -f /tmp/create_dox_keyspace.cql > /dev/null 2>&1
-res=`echo "select keyspace_name from system.schema_keyspaces ;" | cqlsh -u $CASSANDRA_USER -p $CASSANDRA_PASS $CASSANDRA_IP |grep -c dox 2>/dev/null`
+CS_VERSION=`cassandra -v`
+CS_MAJOR_VERSION=`cassandra -v | cut -c1`
+if [ ${CS_MAJOR_VERSION} -gt 2 ]; then
+ echo "`date` --- CS [${CS_VERSION}] uses system_schema.keyspaces"
+ res=`echo "select keyspace_name from system_schema.keyspaces ;" | cqlsh -u $CASSANDRA_USER -p $CASSANDRA_PASS |grep -c dox 2>/dev/null`
+else
+ echo "`date` --- CS [${CS_VERSION}] uses system.schema_keyspaces"
+ res=`echo "select keyspace_name from system.schema_keyspaces ;" | cqlsh -u $CASSANDRA_USER -p $CASSANDRA_PASS |grep -c dox 2>/dev/null`
+fi
-if [ $res -eq 1 ]; then
+if [ $res -gt 0 ]; then
echo "`date` --- dox keyspace was created "
else
echo "`date` --- Failed to create dox keyspace"
fi
+
+echo "run create_dox_db.cql"
+chmod 755 /tmp/create_dox_db.cql
+cqlsh -u $CASSANDRA_USER -p $CASSANDRA_PASS -f /tmp/create_dox_db.cql > /dev/null 2>&1
+$res=$?
+if [ $res -gt 0 ]; then
+ echo "`date` --- dox keyspace: create_dox_db.cql failed ! "
+else
+ echo "`date` --- dox keyspace: create_dox_db.cql completed successfully "
+fi
+
+sleep 10
+
+echo "run alter_dox_db.cql"
+chmod 755 /tmp/alter_dox_db.cql
+cqlsh -u $CASSANDRA_USER -p $CASSANDRA_PASS -f /tmp/alter_dox_db.cql > /dev/null 2>&1
+$res=$?
+if [ $res -gt 0 ]; then
+ echo "`date` --- dox keyspace: alter_dox_db.cql failed !"
+else
+ echo "`date` --- dox keyspace: alter_dox_db.cql completed successfully "
+fi
diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates/default/titan.properties.erb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates/default/titan.properties.erb
new file mode 100644
index 0000000000..bccf2210af
--- /dev/null
+++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates/default/titan.properties.erb
@@ -0,0 +1,25 @@
+storage.backend=cassandra
+storage.hostname=localhost
+storage.port=9160
+storage.username=asdc_user
+storage.password=Aa1234%^!
+storage.cassandra.keyspace=sdctitan
+
+storage.cassandra.ssl.enabled=false
+storage.cassandra.ssl.truststore.location=/var/lib/jetty/config/.truststore
+storage.cassandra.ssl.truststore.password=Aa123456
+
+cache.db-cache = false
+cache.db-cache-clean-wait = 20
+cache.db-cache-time = 180000
+cache.db-cache-size = 0.5
+
+storage.cassandra.read-consistency-level=LOCAL_QUORUM
+storage.cassandra.write-consistency-level=LOCAL_QUORUM
+storage.cassandra.replication-strategy-class=org.apache.cassandra.locator.NetworkTopologyStrategy
+storage.cassandra.replication-strategy-options=<%= @DC_NAME %>,1
+storage.cassandra.astyanax.local-datacenter=<%= @DC_NAME %>
+
+storage.lock.retries=5
+storage.lock.wait-time=500
+