diff options
Diffstat (limited to 'sdc-os-chef')
31 files changed, 658 insertions, 166 deletions
diff --git a/sdc-os-chef/pom.xml b/sdc-os-chef/pom.xml index 451fc88a3e..f825426393 100644 --- a/sdc-os-chef/pom.xml +++ b/sdc-os-chef/pom.xml @@ -1,5 +1,5 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> @@ -11,6 +11,7 @@ <version>1.1.0-SNAPSHOT</version> </parent> + <properties> <docker.tag>${project.version}-${maven.build.timestamp}</docker.tag> <docker.latest.tag>${project.version}-latest</docker.latest.tag> @@ -57,8 +58,12 @@ <docker.latest.tag>${project.version}-STAGING-latest</docker.latest.tag> </properties> </profile> + <profile> <id>docker</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> <build> <plugins> <plugin> @@ -67,7 +72,6 @@ <executions> <execution> <id>copy-resources-be</id> - <!-- here the phase you need --> <phase>validate</phase> <goals> <goal>copy-resources</goal> @@ -78,7 +82,7 @@ <resource> <directory>${project.parent.basedir}/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/target</directory> <includes> - <include>onboarding-be-*.war</include> + <include>onboarding-be-${project.version}.war</include> </includes> </resource> </resources> @@ -86,26 +90,6 @@ </execution> <execution> <id>copy-resources-fe</id> - <!-- here the phase you need --> - <phase>validate</phase> - <goals> - <goal>copy-resources</goal> - </goals> - <configuration> - <outputDirectory>${basedir}/sdc-frontend</outputDirectory> - <resources> - <resource> - <directory>${project.parent.basedir}/openecomp-ui/target</directory> - <includes> - <include>onboarding-fe-${project.version}.war</include> - </includes> - </resource> - </resources> - </configuration> - </execution> - <execution> - <id>copy-resources-sanity</id> - <!-- here the phase you need --> <phase>validate</phase> <goals> <goal>copy-resources</goal> @@ -148,7 +132,6 @@ <tags> <tag>${docker.tag}</tag> <tag>${docker.latest.tag}</tag> - <tag>1.1-STAGING-latest</tag> </tags> </build> </image> @@ -163,7 +146,6 @@ <tags> <tag>${docker.tag}</tag> <tag>${docker.latest.tag}</tag> - <tag>1.1-STAGING-latest</tag> </tags> </build> </image> @@ -178,7 +160,6 @@ <tags> <tag>${docker.tag}</tag> <tag>${docker.latest.tag}</tag> - <tag>1.1-STAGING-latest</tag> </tags> </build> </image> @@ -193,7 +174,6 @@ <tags> <tag>${docker.tag}</tag> <tag>${docker.latest.tag}</tag> - <tag>1.1-STAGING-latest</tag> </tags> </build> </image> @@ -208,11 +188,10 @@ <tags> <tag>${docker.tag}</tag> <tag>${docker.latest.tag}</tag> - <tag>1.1-STAGING-latest</tag> </tags> </build> </image> - + <!-- Build sanity image --> <image> <name>openecomp/sdc-sanity</name> @@ -223,7 +202,6 @@ <tags> <tag>${docker.tag}</tag> <tag>${docker.latest.tag}</tag> - <tag>1.1-STAGING-latest</tag> </tags> </build> </image> @@ -232,15 +210,15 @@ </configuration> <executions> <execution> - <id>clean-images</id> - <phase>pre-clean</phase> - <goals> - <goal>remove</goal> - </goals> - <configuration> - <removeAll>true</removeAll> - <image>openecomp/sdc-backend,openecomp/sdc-frontend,openecomp/sdc-elasticsearch,openecomp/sdc-kibana,openecomp/sdc-sanity</image> - </configuration> + <id>clean-images</id> + <phase>pre-clean</phase> + <goals> + <goal>remove</goal> + </goals> + <configuration> + <removeAll>true</removeAll> + <image>openecomp/sdc-backend,openecomp/sdc-frontend,openecomp/sdc-elasticsearch,openecomp/sdc-kibana,openecomp/sdc-sanity</image> + </configuration> </execution> <execution> @@ -252,19 +230,18 @@ </execution> <execution> - <id>push-images</id> - <phase>deploy</phase> - <goals> + <id>push-images</id> + <phase>deploy</phase> + <goals> + <goal>build</goal> <goal>push</goal> - </goals> - <configuration> - <image>openecomp/sdc-backend,openecomp/sdc-frontend,openecomp/sdc-elasticsearch,openecomp/sdc-kibana,openecomp/sdc-sanity</image> - </configuration> + </goals> + <configuration> + <image>openecomp/sdc-backend,openecomp/sdc-frontend,openecomp/sdc-elasticsearch,openecomp/sdc-kibana,openecomp/sdc-sanity</image> + </configuration> </execution> </executions> - </plugin> - </plugins> </build> </profile> diff --git a/sdc-os-chef/scripts/docker_build.sh b/sdc-os-chef/scripts/docker_build.sh new file mode 100644 index 0000000000..03c922ee77 --- /dev/null +++ b/sdc-os-chef/scripts/docker_build.sh @@ -0,0 +1,196 @@ +#!/bin/bash +#set -x + + +function usage +{ + echo "usage: docker_run.sh [ -r|--release <RELEASE-NAME> ] [ -e|--environment <ENV-NAME> ] [ -p|--port <Docker-hub-port>] [ -h|--help ]" +} + + +function print_log () { + funcname=$1 + lineno=$2 + sev=$3 + msg=$4 + dd=`date +"%Y-%m-%d %H:%M:%S"` + case ${sev} in + "INFO") + COLOR="\033[1;32m" # GREEN + ;; + "ERROR") + COLOR="\033[1;31m" # RED + ;; + esac + echo -e "$dd: $fname, $funcname:$lineno --- ${COLOR} $msg\e[0m" |tee -a $LOG + +} + + + +function conf_proxy () { + grep http_proxy Dockerfile || /bin/sed -i '/FROM/a ARG http_proxy=http://one.proxy.att.com:8080\nARG https_proxy=http://one.proxy.att.com:8080' Dockerfile +} + +################################### +######### Parameters ######### +################################### + +WORKSPACE=$1 +WORK_DIR=/data/sdc-os-chef +LOGFILE=`basename $0|awk -F. '{print $1".log"}'` +LOG=$WORK_DIR/$LOGFILE +DOCKER_REP=dockercentral.it.att.com:5100 +ECOMP_REP=${DOCKER_REP}/com.att.sdc/openecomp +REL=`/usr/bin/xml_grep --text_only parent/version /data/sdc-os-chef/pom.xml` +DOX_VER=` /bin/grep AMDOCS /data/sdc-os-chef/versions.properties | awk '{print $2}' | awk -F"." '{print $1}'` +DOX_NUM=` /bin/grep AMDOCS /data/sdc-os-chef/versions.properties | awk '{print $2}' | awk -F"." '{print substr($NF,1,4)}' ` +VERSION=` /bin/grep ASDC /data/sdc-os-chef/versions.properties | awk '{print $2}' ` +MAVEN_REPO=mavencentral.it.att.com:8084/nexus/content/repositories +ONBOARD_GR=com/att/asdc/onboarding/${DOX_VER}/${DOX_NUM} + + +[ -f /opt/config/env_name.txt ] && DEP_ENV=$(cat /opt/config/env_name.txt) || DEP_ENV=__ENV-NAME__ +[ -f /opt/config/nexus_username.txt ] && NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt) || NEXUS_USERNAME=release +[ -f /opt/config/nexus_password.txt ] && NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt) || NEXUS_PASSWD=sfWU3DFVdBr7GVxB85mTYgAW +[ -f /opt/config/nexus_docker_repo.txt ] && NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt) || NEXUS_DOCKER_REPO=ecomp-nexus:${PORT} + +[ -f /opt/config/nexus_username.txt ] && docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO +#docker login -u m09875@sdc.att.com -p Aa1234%^! -e mg877n@att.com dockercentral.it.att.com:5100 + + +################################### +######## MAIN ######## +################################### +print_log Main $LINENO INFO "##### $0 completed #####" + +################################### +######## sdc-elasticsearch ######## +################################### +cd /data/sdc-os-chef/sdc-elasticsearch +print_log Main $LINENO INFO "start creating sdc-elasticsearch ..." +conf_proxy + +docker build -t ${ECOMP_REP}/sdc-elasticsearch:${VERSION} . +docker tag ${ECOMP_REP}/sdc-elasticsearch:${VERSION} ${ECOMP_REP}/sdc-elasticsearch +docker push ${ECOMP_REP}/sdc-elasticsearch:${VERSION} +res=$? +if [ ${res} -eq 0 ]; then + print_log Main $LINENO INFO "${ECOMP_REP}/sdc-elasticsearch:${VERSION} pushed successfully" +else + print_log Main $LINENO ERROR "Error pushing ${ECOMP_REP}/sdc-elasticsearch:${VERSION}" +fi + + +################################### +######## sdc-cassandra ######## +################################### +cd /data/sdc-os-chef/sdc-cassandra +print_log Main $LINENO INFO "start creating sdc-cassandra ..." + +conf_proxy + +docker build -t ${ECOMP_REP}/sdc-cassandra:${VERSION} . +docker tag ${ECOMP_REP}/sdc-cassandra:$VERSION ${ECOMP_REP}/sdc-cassandra +docker push ${ECOMP_REP}/sdc-cassandra:$VERSION +res=$? +if [ ${res} -eq 0 ]; then + print_log Main $LINENO INFO "${ECOMP_REP}/sdc-cassandra:${VERSION} pushed successfully" +else + print_log Main $LINENO ERROR "Error pushing ${ECOMP_REP}/sdc-cassandra:${VERSION}" +fi + + + +################################### +######## sdc-kibana ######## +################################### +cd /data/sdc-os-chef/sdc-kibana +print_log Main $LINENO INFO "start creating sdc-kibana ..." + +conf_proxy + +docker build -t ${ECOMP_REP}/sdc-kibana:$VERSION . +docker tag ${ECOMP_REP}/sdc-kibana:$VERSION ${ECOMP_REP}/sdc-kibana +docker push ${ECOMP_REP}/sdc-kibana:$VERSION +res=$? +if [ ${res} -eq 0 ]; then + print_log Main $LINENO INFO "${ECOMP_REP}/sdc-kibana:${VERSION} pushed successfully" +else + print_log Main $LINENO ERROR "Error pushing ${ECOMP_REP}/sdc-kibana:${VERSION}" +fi + + +################################### +######## sdc-sanity ######## +################################### +cd /data/sdc-os-chef/sdc-sanity +print_log Main $LINENO INFO "start creating sdc-sanity ..." + +conf_proxy + +docker build -t ${ECOMP_REP}/sdc-sanity:$VERSION . +docker tag ${ECOMP_REP}/sdc-sanity:$VERSION ${ECOMP_REP}/sdc-sanity +docker push ${ECOMP_REP}/sdc-sanity:$VERSION +res=$? +if [ ${res} -eq 0 ]; then + print_log Main $LINENO INFO "${ECOMP_REP}/sdc-sanity:${VERSION} pushed successfully" +else + print_log Main $LINENO ERROR "Error pushing ${ECOMP_REP}/sdc-sanity:${VERSION}" +fi + + +################################### +######## sdc-backend ######## +################################### +cd /data/sdc-os-chef/sdc-backend +print_log Main $LINENO INFO "start creating sdc-backend ..." + +conf_proxy +/bin/sed -i "s/__SDC-RELEASE__/${REL}/g" Dockerfile + +wget -q -nd -r --no-parent -A 'onboard-main*.tar' http://${MAVEN_REPO}/att-repository-snapshots/${ONBOARD_GR}/onboard-main +if [ $? -ne 0 ] ; then + wget -q -nd -r --no-parent -A 'onboard-main*.tar' http://${MAVEN_REPO}/att-repository-releases/${ONBOARD_GR}/onboard-main +fi +/bin/tar -xf onboard-main-${DOX_VER}.*.tar --wildcards --no-anchored "onboarding-be-${DOX_VER}.*.war" +rm onboard-main*.tar + +docker build -t ${ECOMP_REP}/sdc-backend:$VERSION . +docker tag ${ECOMP_REP}/sdc-backend:$VERSION ${ECOMP_REP}/sdc-backend +docker push ${ECOMP_REP}/sdc-backend:$VERSION +res=$? +if [ ${res} -eq 0 ]; then + print_log Main $LINENO INFO "${ECOMP_REP}/sdc-backend:${VERSION} pushed successfully" +else + print_log Main $LINENO ERROR "Error pushing ${ECOMP_REP}/sdc-backend:${VERSION}" +fi + + +################################### +######## sdc-frontend ######## +################################### +cd /data/sdc-os-chef/sdc-frontend +print_log Main $LINENO INFO "start creating sdc-frontend ..." + +conf_proxy + +/bin/sed -i "s/__SDC-RELEASE__/${REL}/g" Dockerfile +wget -q -nd -r --no-parent -A 'onboard-main*.tar' http://${MAVEN_REPO}/att-repository-snapshots/${ONBOARD_GR}/onboard-main +if [ $? -ne 0 ] ; then + wget -q -nd -r --no-parent -A 'onboard-main*.tar' http://${MAVEN_REPO}/att-repository-releases/${ONBOARD_GR}/onboard-main +fi +/bin/tar -xf onboard-main-${DOX_VER}.*.tar --wildcards --no-anchored "onboarding-fe-${DOX_VER}.*.war" +rm onboard-main*.tar + +docker build -t ${ECOMP_REP}/sdc-frontend:$VERSION . +docker tag ${ECOMP_REP}/sdc-frontend:$VERSION ${ECOMP_REP}/sdc-frontend +docker push ${ECOMP_REP}/sdc-frontend:$VERSION +res=$? +if [ ${res} -eq 0 ]; then + print_log Main $LINENO INFO "${ECOMP_REP}/sdc-frontend:${VERSION} pushed successfully" +else + print_log Main $LINENO ERROR "Error pushing ${ECOMP_REP}/sdc-frontend:${VERSION}" +fi + +print_log Main $LINENO INFO "##### $0 completed #####" diff --git a/sdc-os-chef/scripts/docker_clean.sh b/sdc-os-chef/scripts/docker_clean.sh index 6fe1ff615d..3979de6e73 100755 --- a/sdc-os-chef/scripts/docker_clean.sh +++ b/sdc-os-chef/scripts/docker_clean.sh @@ -5,3 +5,4 @@ do docker rm -f ${X} done + diff --git a/sdc-os-chef/scripts/docker_health.sh b/sdc-os-chef/scripts/docker_health.sh index 1db5282446..832b25a237 100755 --- a/sdc-os-chef/scripts/docker_health.sh +++ b/sdc-os-chef/scripts/docker_health.sh @@ -14,7 +14,7 @@ curl http://localhost:8181/sdc1/rest/healthCheck echo "" echo "" res=`curl -s -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "USER_ID: jh0003" "http://localhost:8080/sdc2/rest/v1/user/demo" | wc -l` -if [[ ! ${res} -eq 0 ]] +if [[ ${res} != 0 ]] then echo "Error [${res}] while user existance check" exit ${res} diff --git a/sdc-os-chef/scripts/docker_run.sh b/sdc-os-chef/scripts/docker_run.sh index f885c76d67..23c443e22d 100755 --- a/sdc-os-chef/scripts/docker_run.sh +++ b/sdc-os-chef/scripts/docker_run.sh @@ -73,12 +73,12 @@ docker run --detach --name sdc-es --env ENVNAME="${DEP_ENV}" --log-driver=json-f # cassandra echo "docker run sdc-cassandra..." docker pull ${NEXUS_DOCKER_REPO}/openecomp/sdc-cassandra:${RELEASE} -docker run --detach --name sdc-cs --env ENVNAME="${DEP_ENV}" --env HOST_IP=${IP} --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume /data/CS:/var/lib/cassandra --volume /data/environments:/root/chef-solo/environments --publish 9042:9042 --publish 9160:9160 ${NEXUS_DOCKER_REPO}/openecomp/sdc-cassandra:${RELEASE} +docker run --detach --name sdc-cs --env RELEASE="${RELEASE}" --env ENVNAME="${DEP_ENV}" --env HOST_IP=${IP} --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume /data/CS:/var/lib/cassandra --volume /data/environments:/root/chef-solo/environments --publish 9042:9042 --publish 9160:9160 ${NEXUS_DOCKER_REPO}/openecomp/sdc-cassandra:${RELEASE} echo "please wait while CS is starting..." echo "" -c=25 # seconds to wait +c=120 # seconds to wait REWRITE="\e[25D\e[1A\e[K" while [ $c -gt 0 ]; do c=$((c-1)) diff --git a/sdc-os-chef/sdc-backend/Dockerfile b/sdc-os-chef/sdc-backend/Dockerfile index 128387ae14..e43a156d47 100644 --- a/sdc-os-chef/sdc-backend/Dockerfile +++ b/sdc-os-chef/sdc-backend/Dockerfile @@ -1,4 +1,4 @@ -FROM jetty:9.3.15-jre8 +FROM jetty:9.3-jre8 RUN apt-get -y update RUN apt-get -y install apt-utils @@ -16,12 +16,10 @@ RUN pip install pycurl # install chef-solo RUN curl -L https://omnitruck.chef.io/install.sh | bash -ADD onboarding-be-__SDC-RELEASE__.war ${JETTY_BASE}/webapps/ -ADD catalog-be-__SDC-RELEASE__.war ${JETTY_BASE}/webapps/ +ADD onboarding-be-*.war ${JETTY_BASE}/webapps/ +ADD catalog-be-*.war ${JETTY_BASE}/webapps/ RUN chown -R jetty:jetty ${JETTY_BASE}/webapps COPY startup.sh /root/ - RUN chmod 770 /root/startup.sh - ENTRYPOINT [ "/root/startup.sh" ] diff --git a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/attributes/default.rb b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/attributes/default.rb index 4287ca8617..f011a51021 100644 --- a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/attributes/default.rb +++ b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/attributes/default.rb @@ -1 +1,3 @@ -#
\ No newline at end of file +# +# Example to value after replacement : default['asdctool'][:version] = "1707.0.66.73.1" +default['asdctool'][:version] = "__CATALOG-ASDCTOOL_TAR_NAME__"
\ No newline at end of file diff --git a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_4_setup_configuration.rb b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_4_setup_configuration.rb index 4facd4247c..2c4a786d34 100644 --- a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_4_setup_configuration.rb +++ b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_4_setup_configuration.rb @@ -10,8 +10,8 @@ template "titan.properties" do :CASSANDRA_IP => node['Nodes']['CS'], :CASSANDRA_PWD => node['cassandra'][:cassandra_password], :CASSANDRA_USR => node['cassandra'][:cassandra_user], - :DC_NAME => "DC-"+node.chef_environment, - :rep_factor => replication_factor + :rep_factor => replication_factor, + :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment }) end @@ -28,7 +28,7 @@ template "catalog-be-config" do :ssl_port => node['BE'][:https_port], :cassandra_ip => node['Nodes']['CS'], :rep_factor => 1, - :DC_NAME => "DC-"+node.chef_environment + :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment }) end diff --git a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb index c12c1b4ff6..97732908c4 100644 --- a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb +++ b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb @@ -22,6 +22,8 @@ beProtocol: http beSslPort: <%= @ssl_port %> version: 1.0 released: 2012-11-30 +toscaConformanceLevel: 3.0 +minToscaConformanceLevel: 3.0 titanCfgFile: /var/lib/jetty/config/catalog-be/titan.properties titanInMemoryGraph: false diff --git a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-titan.properties.erb b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-titan.properties.erb index 27386d47ef..a42c7bf206 100644 --- a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-titan.properties.erb +++ b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-titan.properties.erb @@ -4,6 +4,7 @@ storage.port=9160 storage.username=<%= @CASSANDRA_USR %> storage.password=<%= @CASSANDRA_PWD %> storage.connection-timeout=10000 +storage.cassandra.keyspace=sdctitan storage.cassandra.ssl.enabled=false storage.cassandra.ssl.truststore.location=/var/lib/jetty/config/.truststore diff --git a/sdc-os-chef/sdc-cassandra/Dockerfile b/sdc-os-chef/sdc-cassandra/Dockerfile index 1ec802c39b..3e9295db5e 100644 --- a/sdc-os-chef/sdc-cassandra/Dockerfile +++ b/sdc-os-chef/sdc-cassandra/Dockerfile @@ -18,4 +18,4 @@ RUN curl -L https://omnitruck.chef.io/install.sh | bash COPY startup.sh /root/ RUN chmod 770 /root/startup.sh -ENTRYPOINT [ "/root/startup.sh" ]
\ No newline at end of file +ENTRYPOINT [ "/root/startup.sh" ] diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default/alter_dox_db.cql b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default/alter_dox_db.cql new file mode 100644 index 0000000000..e0250b6502 --- /dev/null +++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default/alter_dox_db.cql @@ -0,0 +1,7 @@ +USE dox; +ALTER TABLE vsp_information ADD questionnaire_data text; +ALTER TABLE vsp_information ADD vlm_version frozen<version>; +ALTER TABLE vsp_process ADD type text; +alter table entitlement_pool ADD version_uuid text; +alter table license_key_group ADD version_uuid text; +delete from application_config where namespace='vsp.monitoring' and key = 'component.ceilometer'; diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default/create_dox_db.cql b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default/create_dox_db.cql new file mode 100644 index 0000000000..fa0831051a --- /dev/null +++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default/create_dox_db.cql @@ -0,0 +1,52 @@ +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>, is_old_version text, 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, type 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); +CREATE TABLE IF NOT EXISTS vsp_orchestration_template_candidate (vsp_id text, version frozen<version>, files_data_structure text, content_data blob, PRIMARY KEY ((vsp_id, version))); +CREATE TABLE IF NOT EXISTS vsp_component_dependency_model (vsp_id text, version frozen<version>, dependency_id text, sourcecomponent_id text, targetcomponent_id text, relation text, PRIMARY KEY ((vsp_id, version), dependency_id)); +CREATE TABLE IF NOT EXISTS activity_log (item_id text, version_id text, activity_id text, type text, user text, timestamp timestamp, success boolean, message text, comment text, PRIMARY KEY (item_id, version_id, activity_id)); +CREATE TABLE IF NOT EXISTS migration (id text, ismigrated boolean, primary key(id)); +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.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> }, "vfcCode": { "type": "string" }, "description": { "type": "string" } }, "additionalProperties": false, "required": [ "name"<#if !manual && component.displayName??>, "displayName"</#if> ] }'); +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.nic', '{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "protocols": { "type": "object", "properties": { "protocols": { "type": "array", "items": { "type": "string", "enum": [ "", "TCP", "UDP", "SCTP", "IPsec" ], "default": "" }, "minItems": 1 }, "protocolWithHighestTrafficProfile": { "$ref": "#/properties/protocols/properties/protocols/items" } }, "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" ], "default": "" }, "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" ], "default": "" } } }, "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.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": [ "AIC", "Vendor" ], "default": "AIC" }, "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", "maxLength": 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": { "isComponentMandatory": { "type": "string", "enum": ["","YES", "NO"], "default": "" }, "highAvailabilityMode": { "type": "string", "enum": ["","geo-activeactive", "geo-activestandby", "local-activeactive", "local-activestandby"], "default": "" }, "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" ], "default": "" }, "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}"</#list></#if> ], "default": "" } }, "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.monitoring', 'compute.ceilometer', '{ "ceilometerMetricList": [ { "name": "instance", "type": "Gauge", "unit": "instance", "category": "compute", "description": "Existence of instance" }, { "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": "vcpu", "category": "compute", "description": "Number of virtual CPUs allocated to the instance" }, { "name": "disk.latency", "type": "Gauge", "unit": "ms", "category": "disk", "description": "Average disk latency" }, { "name": "disk.iops", "type": "Gauge", "unit": "count/s", "category": "disk", "description": "Average disk iops" }, { "name": "disk.device.latency", "type": "Gauge", "unit": "ms", "category": "disk", "description": "Average disk latency per device" }, { "name": "disk.device.iops", "type": "Gauge", "unit": "count/s", "category": "disk", "description": "Average disk iops per device" }, { "name": "disk.capacity", "type": "Gauge", "unit": "B", "category": "disk", "description": "The amount of disk that the instance can see" }, { "name": "disk.allocation", "type": "Gauge", "unit": "B", "category": "disk", "description": "The amount of disk occupied by the instance on the host machine" }, { "name": "disk.usage", "type": "Gauge", "unit": "B", "category": "disk", "description": "The physical size in bytes of the image container on the host" }, { "name": "disk.device.capacity", "type": "Gauge", "unit": "B", "category": "disk", "description": "The amount of disk per device that the instance can see" }, { "name": "disk.device.allocation", "type": "Gauge", "unit": "B", "category": "disk", "description": "The amount of disk per device occupied by the instance on the host machine" }, { "name": "disk.device.usage", "type": "Gauge", "unit": "B", "category": "disk", "description": "The physical size in bytes of the image container on the host per device" }, { "name": "disk.device.read.requests", "type": "Cumulative", "unit": "request", "category": "disk", "description": "Number of read requests" }, { "name": "disk.device.read.requests.rate", "type": "Gauge", "unit": "request/s", "category": "disk", "description": "Average rate of read requests" }, { "name": "disk.device.write.requests", "type": "Cumulative", "unit": "request", "category": "disk", "description": "Number of write requests" }, { "name": "disk.device.write.requests.rate", "type": "Gauge", "unit": "request/s", "category": "disk", "description": "Average rate of write requests" }, { "name": "disk.device.read.bytes", "type": "Cumulative", "unit": "B", "category": "disk", "description": "Volume of reads" }, { "name": "disk.device.read.bytes.rate", "type": "Gauge", "unit": "B/s", "category": "disk", "description": "Average rate of reads" }, { "name": "disk.device.write.bytes", "type": "Cumulative", "unit": "B", "category": "disk", "description": "Volume of writes" }, { "name": "disk.device.write.bytes.rate", "type": "Gauge", "unit": "B/s", "category": "disk", "description": "Average rate of writes" }, { "name": "disk.write.requests", "type": "Cumulative", "unit": "request", "category": "compute", "description": "Number of write requests" }, { "name": "disk.write.requests.rate", "type": "Gauge", "unit": "request/s", "category": "compute", "description": "Average rate of write requests" }, { "name": "disk.read.bytes", "type": "Cumulative", "unit": "B", "category": "compute", "description": "Volume of reads" }, { "name": "disk.read.bytes.rate", "type": "Gauge", "unit": "B/s", "category": "compute", "description": "Average rate of reads" }, { "name": "disk.write.bytes", "type": "Cumulative", "unit": "B", "category": "compute", "description": "Volume of writes" }, { "name": "disk.write.bytes.rate", "type": "Gauge", "unit": "B/s", "category": "compute", "description": "Average rate of writes" }, { "name": "disk.read.requests", "type": "Cumulative", "unit": "request", "category": "compute", "description": "Number of read requests" }, { "name": "disk.root.size", "type": "Gauge", "unit": "GB", "category": "compute", "description": "Size of root disk" }, { "name": "disk.ephemeral.size", "type": "Gauge", "unit": "GB", "category": "compute", "description": "Size of ephemeral disk" } ] }'); +INSERT INTO application_config (namespace,key,value) VALUES ('vsp.monitoring', 'port.ceilometer', '{ "ceilometerMetricList": [ { "name": "network.incoming.bytes", "type": "Cumulative", "unit": "B", "category": "network", "description": "Number of incoming bytes" }, { "name": "network.incoming.bytes.rate", "type": "Gauge", "unit": "B/s", "category": "network", "description": "Average rate of incoming bytes" }, { "name": "network.outgoing.bytes", "type": "Cumulative", "unit": "B", "category": "network", "description": "Number of outgoing bytes" }, { "name": "network.outgoing.bytes.rate", "type": "Gauge", "unit": "B/s", "category": "network", "description": "Average rate of outgoing bytes" }, { "name": "network.incoming.packets", "type": "Cumulative", "unit": "packet", "category": "network", "description": "Number of incoming packets" }, { "name": "network.incoming.packets.rate", "type": "Gauge", "unit": "packet/s", "category": "network", "description": "Average rate of incoming packets" }, { "name": "network.outpoing.packets", "type": "Cumulative", "unit": "packet", "category": "network", "description": "Number of outgoing packets" }, { "name": "network.outgoing.packets.rate", "type": "Gauge", "unit": "packet/s", "category": "network", "description": "Average rate of outgoing packets" } ] }'); +USE zusammen_dox; +CREATE TABLE IF NOT EXISTS item (item_id text primary key, item_info text, creation_time timestamp, modification_time timestamp); +CREATE TABLE IF NOT EXISTS version (space text, item_id text, version_id text,base_version_id text,info text,relations text,creation_time timestamp,modification_time timestamp,PRIMARY KEY (( space, item_id ), version_id)); +CREATE TABLE IF NOT EXISTS version_elements (space text,item_id text,version_id text,element_ids set<text>,PRIMARY KEY (( space, item_id, version_id ))); +CREATE TABLE IF NOT EXISTS element_namespace (space text, item_id text, element_id text, namespace text, PRIMARY KEY ((space, item_id, element_id))); +CREATE TABLE IF NOT EXISTS element (space text,item_id text,version_id text,element_id text,parent_id text,namespace text,info text,relations text,data blob,searchable_data blob,visualization blob,sub_element_ids set<text>,PRIMARY KEY (( space, item_id, version_id, element_id ))); diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default/titan.properties b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default/titan.properties new file mode 100644 index 0000000000..43944eae47 --- /dev/null +++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default/titan.properties @@ -0,0 +1,6 @@ +storage.backend=cassandra +storage.hostname=localhost +storage.port=9160 +storage.username=asdc_user +storage.password=Aa1234%^! +storage.cassandra.keyspace=sdctitan
\ No newline at end of file diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default/zusammen.tgz b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default/zusammen.tgz Binary files differnew file mode 100644 index 0000000000..0a9842917d --- /dev/null +++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default/zusammen.tgz diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/01-configureCassandra.rb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/01-configureCassandra.rb index 9313aa87ff..f167c3ec8d 100644 --- a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/01-configureCassandra.rb +++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/01-configureCassandra.rb @@ -16,6 +16,7 @@ end template "cassandra-yaml-config" do path "/etc/cassandra/cassandra.yaml" source "cassandra.yaml.erb" + sensitive true owner "cassandra" group "cassandra" mode "0755" @@ -43,7 +44,7 @@ template "cassandra-rackdc.properties" do group "cassandra" mode "0755" variables ({ - :dc => "DC-"+node.chef_environment, + :dc => cluster_name, :rack => "Rack"+"#{rackNum}-"+node.chef_environment }) end diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/02-createCsUser.rb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/02-createCsUser.rb index 627bd6fe7e..1ebc80d5e4 100644 --- a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/02-createCsUser.rb +++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/02-createCsUser.rb @@ -1,8 +1,15 @@ template "/tmp/create_cassandra_user.sh" do source "create_cassandra_user.sh.erb" + sensitive true mode 0755 variables({ :cassandra_ip => "HOSTIP" }) end + +bash "create-sdc-user" do + code <<-EOH + cd /tmp ; /tmp/create_cassandra_user.sh + EOH +end diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-createDoxKeyspace.rb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-createDoxKeyspace.rb index 92a81eb7dc..e54932d1c4 100644 --- a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-createDoxKeyspace.rb +++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-createDoxKeyspace.rb @@ -1,8 +1,32 @@ template "/tmp/create_dox_keyspace.sh" do source "create_dox_keyspace.sh.erb" + sensitive true mode 0755 variables({ - :cassandra_ip => "HOSTIP" + :cassandra_ip => "HOSTIP", + :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment }) end + +cookbook_file "/tmp/create_dox_db.cql" do + sensitive true + source "create_dox_db.cql" + mode 0755 +end + +cookbook_file "/tmp/alter_dox_db.cql" do + sensitive true + source "alter_dox_db.cql" + mode 0755 +end + + +bash "create-DOX-schema" do + ignore_failure true + code <<-EOH + cd /tmp + chmod +x /tmp/create_dox_keyspace.sh + /tmp/create_dox_keyspace.sh + EOH +end diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/04-schemaCreation.rb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/04-schemaCreation.rb index 7c40c509c2..5890603829 100644 --- a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/04-schemaCreation.rb +++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/04-schemaCreation.rb @@ -7,12 +7,24 @@ end bash "install tar" do cwd "/tmp" code <<-EOH - /bin/tar xvf /tmp/sdctool.tar -C /tmp + /bin/tar xf /tmp/sdctool.tar -C /tmp EOH end +template "titan.properties" do + sensitive true + path "/tmp/sdctool/config/titan.properties" + source "titan.properties.erb" + mode "0755" + variables({ + :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment + }) +end + + template "/tmp/sdctool/config/configuration.yaml" do + sensitive true source "configuration.yaml.erb" mode 0755 variables({ @@ -21,11 +33,14 @@ template "/tmp/sdctool/config/configuration.yaml" do :ssl_port => node['BE'][:https_port], :cassandra_ip => node['Nodes']['CS'], :rep_factor => 1, - :dc1 => "DC-"+node.chef_environment + :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment, + :titan_Path => "/tmp/sdctool/config/" }) end + template "/tmp/sdctool/config/elasticsearch.yml" do + sensitive true source "elasticsearch.yml.erb" mode 0755 variables({ @@ -33,3 +48,11 @@ template "/tmp/sdctool/config/elasticsearch.yml" do }) end + +bash "excuting-schema-creation" do + code <<-EOH + cd /tmp + chmod +x /tmp/sdctool/scripts/schemaCreation.sh + /tmp/sdctool/scripts/schemaCreation.sh /tmp/sdctool/config + EOH +end diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/05-titanSchemaCreation.rb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/05-titanSchemaCreation.rb new file mode 100644 index 0000000000..a3af2f490f --- /dev/null +++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/05-titanSchemaCreation.rb @@ -0,0 +1,61 @@ +cookbook_file "/tmp/sdctool.tar" do + sensitive true + source "sdctool.tar" + mode 0755 +end + +## extract sdctool.tar +bash "install tar" do + cwd "/tmp" + code <<-EOH + /bin/tar xf /tmp/sdctool.tar -C /tmp + EOH +end + + +template "titan.properties" do + sensitive true + path "/tmp/sdctool/config/titan.properties" + source "titan.properties.erb" + mode "0755" + variables({ + :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment + }) +end + + +template "/tmp/sdctool/config/configuration.yaml" do + sensitive true + source "configuration.yaml.erb" + mode 0755 + variables({ + :host_ip => node['HOST_IP'], + :catalog_port => node['BE'][:http_port], + :ssl_port => node['BE'][:https_port], + :cassandra_ip => node['Nodes']['CS'], + :rep_factor => 1, + :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment, + :titan_Path => "/tmp/sdctool/config" + }) +end + +template "/tmp/sdctool/config/elasticsearch.yml" do + sensitive true + source "elasticsearch.yml.erb" + mode 0755 + variables({ + :elastic_ip => "HOSTIP" + }) +end + + +bash "excuting-titanSchemaCreation.sh" do + code <<-EOH + echo "XXXXXXXXXXXX executing /tmp/sdctool/scripts/titanSchemaCreation.sh XXXXXXXXXXXX" + chmod +x /tmp/sdctool/scripts/titanSchemaCreation.sh + /tmp/sdctool/scripts/titanSchemaCreation.sh /tmp/sdctool/config + EOH +end + + + diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/06-migrateZusammenFromDox.rb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/06-migrateZusammenFromDox.rb new file mode 100644 index 0000000000..e1fcf4f556 --- /dev/null +++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/06-migrateZusammenFromDox.rb @@ -0,0 +1,14 @@ +#onboarding_version = "#{node['onboarding'][:version]}" +#GROUP_ID = "com/att/asdc/onboarding/#{onboarding_version}" +#NEXUS_IP = "#{node['nexus_ip']}" + +bash "Excuting openecomp-zusammen-migration-1707.0.0-SNAPSHOT.jar" do + code <<-EOH + [ -d /var/tmp/onboarding/migration ] && rm -rf /var/tmp/onboarding || mkdir -p /var/tmp/onboarding/migration + cd /var/tmp/onboarding/migration + /bin/tar -xzf /root/chef-solo/cookbooks/cassandra-actions/files/default/zusammen.tgz -C /var/tmp/onboarding/migration + cd /var/tmp/onboarding/migration + java -Dlog.home=/var/tmp/onboarding/migration/logs -Dconfiguration.yaml=/tmp/sdctool/config/configuration.yaml -jar openecomp-zusammen-migration-1707.0.0-SNAPSHOT.jar org.openecomp.core.migration.MigrationMain + EOH +end + 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 + diff --git a/sdc-os-chef/sdc-cassandra/chef-solo/roles/cassandra-actions.json b/sdc-os-chef/sdc-cassandra/chef-solo/roles/cassandra-actions.json index 8d8931c2b5..d8155e2068 100644 --- a/sdc-os-chef/sdc-cassandra/chef-solo/roles/cassandra-actions.json +++ b/sdc-os-chef/sdc-cassandra/chef-solo/roles/cassandra-actions.json @@ -12,7 +12,9 @@ "run_list": [ "recipe[cassandra-actions::02-createCsUser]", "recipe[cassandra-actions::03-createDoxKeyspace]", - "recipe[cassandra-actions::04-schemaCreation]" + "recipe[cassandra-actions::04-schemaCreation]", + "recipe[cassandra-actions::05-titanSchemaCreation]", + "recipe[cassandra-actions::07-importComformance]" ], "env_run_lists": { diff --git a/sdc-os-chef/sdc-cassandra/startup.sh b/sdc-os-chef/sdc-cassandra/startup.sh index 89d95ea022..3c001dfbab 100755 --- a/sdc-os-chef/sdc-cassandra/startup.sh +++ b/sdc-os-chef/sdc-cassandra/startup.sh @@ -1,6 +1,10 @@ #!/bin/bash cd /root/chef-solo +mkdir -p /root/chef-solo/cookbooks/cassandra-actions/attributes +echo "normal['version'] = \"${RELEASE}\"" > /root/chef-solo/cookbooks/cassandra-actions/attributes/default.rb +echo "normal['HOST_IP'] = \"${HOST_IP}\"" >> /root/chef-solo/cookbooks/cassandra-actions/attributes/default.rb + export CHEFNAME=${ENVNAME} sed -i "s/HOSTIP/${HOST_IP}/g" /root/chef-solo/cookbooks/cassandra-actions/recipes/02-createCsUser.rb @@ -15,14 +19,9 @@ echo "########### starting cassandra ###########" # start cassandra /docker-entrypoint.sh cassandra -f & -chef-solo -c solo.rb -E ${CHEFNAME} +sleep 10 -cd /tmp/ -/tmp/create_cassandra_user.sh -/tmp/create_dox_keyspace.sh -/bin/chmod +x sdctool/scripts/*.sh -./sdctool/scripts/schemaCreation.sh /tmp/sdctool/config +chef-solo -c solo.rb -E ${CHEFNAME} while true; do sleep 2; done - diff --git a/sdc-os-chef/sdc-elasticsearch/Dockerfile b/sdc-os-chef/sdc-elasticsearch/Dockerfile index 9dee9dcd8b..de3d43e7f9 100644 --- a/sdc-os-chef/sdc-elasticsearch/Dockerfile +++ b/sdc-os-chef/sdc-elasticsearch/Dockerfile @@ -9,14 +9,10 @@ RUN mkdir -p /var/chef/nodes COPY chef-solo /root/chef-solo/ COPY chef-repo/cookbooks /root/chef-solo/cookbooks/ -ENV BASE_NEXUS zl999y:ChangeMe@10.208.197.75:8443/repository/maven-public/org/openecomp/sdc - # install chef-solo RUN curl -L https://omnitruck.chef.io/install.sh | bash - COPY startup.sh /root/ - RUN chmod 770 /root/startup.sh ENTRYPOINT [ "/root/startup.sh" ] diff --git a/sdc-os-chef/sdc-elasticsearch/chef-repo/cookbooks/sdc-elasticsearch/recipes/ES_6_create_kibana_dashboard_virtualization.rb b/sdc-os-chef/sdc-elasticsearch/chef-repo/cookbooks/sdc-elasticsearch/recipes/ES_6_create_kibana_dashboard_virtualization.rb index 5f86391199..a3b15073a1 100644 --- a/sdc-os-chef/sdc-elasticsearch/chef-repo/cookbooks/sdc-elasticsearch/recipes/ES_6_create_kibana_dashboard_virtualization.rb +++ b/sdc-os-chef/sdc-elasticsearch/chef-repo/cookbooks/sdc-elasticsearch/recipes/ES_6_create_kibana_dashboard_virtualization.rb @@ -1,3 +1,11 @@ +cookbook_file "/usr/share/elasticsearch/config/kibana_dashboard_virtualization.json" do + source "kibana_dashboard_virtualization.json" + owner "elasticsearch" + group "elasticsearch" + mode "0755" +end + + ruby_block "check_ElasticSearch_Cluster_Health" do block do diff --git a/sdc-os-chef/sdc-frontend/Dockerfile b/sdc-os-chef/sdc-frontend/Dockerfile index 79fd9186d6..a59d868f7f 100644 --- a/sdc-os-chef/sdc-frontend/Dockerfile +++ b/sdc-os-chef/sdc-frontend/Dockerfile @@ -14,7 +14,7 @@ RUN curl -L https://omnitruck.chef.io/install.sh | bash RUN cp ${JETTY_HOME}/resources/log4j.properties ${JETTY_BASE}/resources/log4j.properties ADD onboarding*.war ${JETTY_BASE}/webapps/ -ADD catalog-fe-__SDC-RELEASE__.war ${JETTY_BASE}/webapps/ +ADD catalog-fe-*.war ${JETTY_BASE}/webapps/ RUN chown -R jetty:jetty ${JETTY_BASE}/webapps COPY startup.sh /root/ diff --git a/sdc-os-chef/sdc-kibana/Dockerfile b/sdc-os-chef/sdc-kibana/Dockerfile index 54aeb2c685..be5446e2e9 100644 --- a/sdc-os-chef/sdc-kibana/Dockerfile +++ b/sdc-os-chef/sdc-kibana/Dockerfile @@ -7,12 +7,9 @@ RUN apt-get -y install vim COPY chef-solo /root/chef-solo/ COPY chef-repo/cookbooks/. /root/chef-solo/cookbooks/ - # install chef-solo RUN curl -L https://omnitruck.chef.io/install.sh | bash - - COPY startup.sh /root/ RUN chmod 770 /root/startup.sh diff --git a/sdc-os-chef/sdc-sanity/Dockerfile b/sdc-os-chef/sdc-sanity/Dockerfile index 3c63c1d156..dd486102c5 100644 --- a/sdc-os-chef/sdc-sanity/Dockerfile +++ b/sdc-os-chef/sdc-sanity/Dockerfile @@ -5,16 +5,12 @@ RUN apt-get -y install vim RUN apt-get -y install default-jre && apt-get -y install openjdk-8-jdk RUN update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java - COPY chef-solo /root/chef-solo/ COPY chef-repo/cookbooks/. /root/chef-solo/cookbooks/ - # install chef-solo RUN curl -L https://omnitruck.chef.io/install.sh | bash COPY startup.sh /root/ - RUN chmod 770 /root/startup.sh - ENTRYPOINT [ "/root/startup.sh" ] |