aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/sdc-backend
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2018-07-29 16:13:45 +0300
committerMichael Lando <ml636r@att.com>2018-07-29 16:20:34 +0300
commit5b593496b8f1b8e8be8d7d2dbcc223332e65a49b (patch)
tree2f9dfc45191e723da69cf74be7829784e9741b94 /catalog-be/sdc-backend
parent9200382f2ce7b4bb729aa287d0878004b2d2b4f9 (diff)
re base code
Change-Id: I12a5ca14a6d8a87e9316b9ff362eb131105f98a5 Issue-ID: SDC-1566 Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'catalog-be/sdc-backend')
-rw-r--r--catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/attributes/default.rb21
-rw-r--r--catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb29
-rw-r--r--catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb44
-rw-r--r--catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-titan.properties.erb4
4 files changed, 70 insertions, 28 deletions
diff --git a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/attributes/default.rb b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/attributes/default.rb
index a2173aac5c..26a6beb514 100644
--- a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/attributes/default.rb
+++ b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/attributes/default.rb
@@ -13,3 +13,24 @@ default['jetty'][:truststore_pwd] = "OBF:1cp61iuj194s194u194w194y1is31cok"
default['DCAE']['BE'][:http_port] = 8082
default['DCAE']['BE'][:https_port] = 8444
default['DCAE_BE_VIP'] = "dcae-be"
+
+#Cassandra
+default['cassandra']['datacenter_name'] = "DC-"
+default['cassandra']['cluster_name'] = "SDC-CS-"
+default['cassandra']['socket_read_timeout'] = 20000
+default['cassandra']['socket_connect_timeout'] = 20000
+default['cassandra']['titan_connection_timeout'] = 10000
+
+#Elasticsearch
+default['elasticsearch']['cluster_name'] = "SDC-ES-"
+
+#Onboard
+default['ONBOARDING_BE'][:http_port] = 8081
+default['ONBOARDING_BE'][:https_port] = 8445
+
+#UEB
+default['UEB']['fqdn'] = [ "uebsb91sfdc.it.att.com", "uebsb92sfdc.it.att.com", "uebsb93sfdc.it.att.com" ]
+default['UEB']['PublicKey'] = "sSJc5qiBnKy2qrlc"
+default['UEB']['SecretKey'] = "4ZRPzNJfEUK0sSNBvccd2m7X"
+
+default['Pair_EnvName'] = ""
diff --git a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb
index ac378fa106..0d1e722a70 100644
--- a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb
+++ b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb
@@ -9,6 +9,17 @@ else
end
+
+if node['Pair_EnvName'] == ""
+ titan_dcname_with_rep = node['cassandra']['datacenter_name'] + node.chef_environment + "," + replication_factor.to_s
+ conf_dcname_with_rep = node['cassandra']['datacenter_name'] + node.chef_environment + "','" + replication_factor.to_s
+else
+ titan_dcname_with_rep = node['cassandra']['datacenter_name'] + node.chef_environment + "," + replication_factor.to_s + "," + node['cassandra']['cluster_name'] + node['Pair_EnvName'] + "," + replication_factor.to_s
+ conf_dcname_with_rep = node['cassandra']['datacenter_name'] + node.chef_environment + "','" + replication_factor.to_s + "','" + node['cassandra']['cluster_name'] + node['Pair_EnvName'] + "','" + replication_factor.to_s
+end
+
+
+
template "titan.properties" do
path "#{ENV['JETTY_BASE']}/config/catalog-be/titan.properties"
source "BE-titan.properties.erb"
@@ -20,7 +31,8 @@ template "titan.properties" do
:cassandra_pwd => node['cassandra'][:cassandra_password],
:cassandra_usr => node['cassandra'][:cassandra_user],
:rep_factor => replication_factor,
- :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment,
+ :DC_NAME => node['cassandra']['datacenter_name']+node.chef_environment,
+ :DC_NAME_WITH_REP => titan_dcname_with_rep,
:titan_connection_timeout => node['cassandra']['titan_connection_timeout'],
:cassandra_truststore_password => node['cassandra'][:truststore_password],
:cassandra_ssl_enabled => "#{ENV['cassandra_ssl_enabled']}"
@@ -28,6 +40,7 @@ template "titan.properties" do
end
+
template "catalog-be-config" do
path "#{ENV['JETTY_BASE']}/config/catalog-be/configuration.yaml"
source "BE-configuration.yaml.erb"
@@ -35,12 +48,13 @@ template "catalog-be-config" do
group "jetty"
mode "0755"
variables({
- :catalog_ip => node['Nodes']['BE'],
+ :catalog_ip => node['BE_VIP'],
:catalog_port => node['BE'][:http_port],
:ssl_port => node['BE'][:https_port],
:cassandra_ip => node['Nodes']['CS'].join(",").gsub(/[|]/,''),
:rep_factor => replication_factor,
- :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment,
+ :DC_NAME => node['cassandra']['datacenter_name']+node.chef_environment,
+ :REP_STRING => conf_dcname_with_rep,
:titan_Path => "/var/lib/jetty/config/catalog-be/",
:socket_connect_timeout => node['cassandra']['socket_connect_timeout'],
:socket_read_timeout => node['cassandra']['socket_read_timeout'],
@@ -53,6 +67,7 @@ template "catalog-be-config" do
end
+
template "distribution-engine-configuration" do
path "#{ENV['JETTY_BASE']}/config/catalog-be/distribution-engine-configuration.yaml"
source "BE-distribution-engine-configuration.yaml.erb"
@@ -61,11 +76,3 @@ template "distribution-engine-configuration" do
mode "0755"
end
-
-cookbook_file "ArtifactGenerator" do
- path "#{ENV['JETTY_BASE']}/config/catalog-be/Artifact-Generator.properties"
- source "Artifact-Generator.properties"
- owner "jetty"
- group "jetty"
- mode "0755"
-end
diff --git a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb
index 4d86fbf6c7..ba9efe48ea 100644
--- a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb
+++ b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb
@@ -25,7 +25,7 @@ beProtocol: http
beSslPort: <%= @ssl_port %>
version: 1.1.0
released: 2012-11-30
-toscaConformanceLevel: 10.0
+toscaConformanceLevel: 8.0
minToscaConformanceLevel: 3.0
titanCfgFile: /var/lib/jetty/config/catalog-be/titan.properties
@@ -62,6 +62,9 @@ defaultImports:
file: groups.yml
- policies:
file: policies.yml
+ - annotations:
+ file: annotations.yml
+
# Users
users:
tom: passwd
@@ -78,14 +81,14 @@ cassandraConfig:
username: <%= @cassandra_usr %>
password: <%= @cassandra_pwd %>
ssl: <%= @cassandra_ssl_enabled %>
- truststorePath : /config/truststore
- truststorePassword : <%= @cassandra_traststore_password %>
+ truststorePath : /var/lib/jetty/etc/truststore
+ truststorePassword : <%= @cassandra_truststore_password %>
keySpaces:
- - { 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 %>']}
- - { name: sdcrepository, replicationStrategy: NetworkTopologyStrategy, replicationInfo: ['<%= @DC_NAME %>','<%= @rep_factor %>']}
+ - { name: dox, replicationStrategy: NetworkTopologyStrategy, replicationInfo: ['<%= @REP_STRING %>']}
+ - { name: sdcaudit, replicationStrategy: NetworkTopologyStrategy, replicationInfo: ['<%= @REP_STRING %>']}
+ - { name: sdcartifact, replicationStrategy: NetworkTopologyStrategy, replicationInfo: ['<%= @REP_STRING %>']}
+ - { name: sdccomponent, replicationStrategy: NetworkTopologyStrategy, replicationInfo: ['<%= @REP_STRING %>']}
+ - { name: sdcrepository, replicationStrategy: NetworkTopologyStrategy, replicationInfo: ['<%= @REP_STRING %>']}
#Application-specific settings of ES
elasticSearch:
@@ -144,6 +147,7 @@ resourceTypes: &allResourceTypes
- CP
- VL
- VF
+ - CR
- VFCMT
- Abstract
- CVFC
@@ -182,6 +186,7 @@ excludeResourceCategory:
- Generic
excludeResourceType:
- PNF
+ - CR
informationalResourceArtifacts:
features:
displayName: Features
@@ -290,6 +295,9 @@ serviceDeploymentArtifacts:
MODEL_QUERY_SPEC:
acceptedTypes:
- xml
+ UCPE_LAYER_2_CONFIGURATION:
+ acceptedTypes:
+ - xml
#AAI Artifacts
AAI_SERVICE_MODEL:
@@ -402,8 +410,8 @@ resourceDeploymentArtifacts:
DCAE_DOC:
acceptedTypes:
validForResourceTypes:
- - VF
- - VFCMT
+ - VF
+ - VFCMT
DCAE_EVENT:
acceptedTypes:
validForResourceTypes:
@@ -509,12 +517,13 @@ resourceInformationalArtifacts:
validForResourceTypes: *allResourceTypes
OTHER:
acceptedTypes:
- validForResourceTypes:
+ validForResourceTypes:
- VFC
- CVFC
- CP
- VL
- VF
+ - CR
- VFCMT
- Abstract
- PNF
@@ -634,6 +643,7 @@ genericAssetNodeTypes:
VFC: org.openecomp.resource.abstract.nodes.VFC
CVFC: org.openecomp.resource.abstract.nodes.VFC
VF : org.openecomp.resource.abstract.nodes.VF
+ CR : org.openecomp.resource.abstract.nodes.CR
PNF: org.openecomp.resource.abstract.nodes.PNF
Service: org.openecomp.resource.abstract.nodes.service
@@ -680,11 +690,11 @@ dmaapConsumerConfiguration:
aftDme2RoundtripTimeoutMs: 240000
aftDme2ReadTimeoutMs: 50000
dme2preferredRouterFilePath: DME2preferredRouter.txt
- timeLimitForNotificationHandleMs: 120000
+ timeLimitForNotificationHandleMs: 120000
credential:
username: user
password:
-
+
dmeConfiguration:
dme2Search: DME2SEARCH
dme2Resolve: DME2RESOLVE
@@ -695,12 +705,16 @@ excludedPolicyTypesMapping:
# - c.d.e
#CR:
# - x.y.z
-
+
excludedGroupTypesMapping:
CR:
- org.openecomp.groups.VfModule
- org.openecomp.groups.heat.HeatStack
- tosca.groups.Root
+ PNF:
+ - org.openecomp.groups.VfModule
+ - org.openecomp.groups.heat.HeatStack
+ - tosca.groups.Root
VF:
- org.openecomp.groups.VfModule
- org.openecomp.groups.heat.HeatStack
@@ -712,5 +726,5 @@ excludedGroupTypesMapping:
healthStatusExclude:
- DE
- - DMAPP
+ - DMAAP
- DCAE
diff --git a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-titan.properties.erb b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-titan.properties.erb
index 8667cbf612..1a259a1f98 100644
--- a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-titan.properties.erb
+++ b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-titan.properties.erb
@@ -7,13 +7,13 @@ storage.connection-timeout=<%= @titan_connection_timeout %>
storage.cassandra.keyspace=sdctitan
storage.cassandra.ssl.enabled=<%= @cassandra_ssl_enabled %>
-storage.cassandra.ssl.truststore.location=/var/lib/jetty/config/truststore
+storage.cassandra.ssl.truststore.location=/var/lib/jetty/etc/truststore
storage.cassandra.ssl.truststore.password=<%= @cassandra_truststore_password %>
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 %>,<%= @rep_factor %>
+storage.cassandra.replication-strategy-options=<%= @DC_NAME_WITH_REP %>
storage.cassandra.astyanax.local-datacenter=<%= @DC_NAME %>