Browse Source

Make SM manage docker local registry.

This is part of Local Docker Registry HA Integration.

Story: 2002840
Task: 22782

Change-Id: I26edb7705243a9ccb54253d941912756424a0928
Signed-off-by: Don Penney <don.penney@windriver.com>
Signed-off-by: Jack Ding <jack.ding@windriver.com>
tags/2018.08.0
Jerry Sun 11 months ago
parent
commit
b8b80494ee
1 changed files with 28 additions and 0 deletions
  1. 28
    0
      service-mgmt/sm-db-1.0.0/database/create_sm_db.sql

+ 28
- 0
service-mgmt/sm-db-1.0.0/database/create_sm_db.sql View File

@@ -969,6 +969,34 @@ INSERT INTO "CONFIGURATION" VALUES(1,'ENABLING_THROTTLE','2');
969 969
 -- to add new service or service memeber, follow the examples below, avoid using a hardcoded id
970 970
 -- INSERT INTO "SERVICES" SELECT MAX(id) + 1,'no','drbd-patch-vault','initial','initial','none','none',2,1,90000,4,16,'' FROM "SERVICES";
971 971
 -- INSERT INTO "SERVICE_GROUP_MEMBERS" SELECT MAX(id) + 1,'no','distributed-cloud-services','dcorch-nova-api-proxy','critical' FROM "SERVICE_GROUP_MEMBERS";
972
+INSERT INTO "SERVICE_GROUP_MEMBERS" SELECT MAX(id) + 1,'no','controller-services','docker-distribution','critical' FROM "SERVICE_GROUP_MEMBERS";
973
+INSERT INTO "SERVICES" SELECT MAX(id) + 1, 'no','docker-distribution','initial','initial','none','none',2,1,90000,4,16,'/var/run/docker-distribution.pid' FROM "SERVICES";
974
+INSERT INTO "SERVICE_DEPENDENCY" VALUES('action','docker-distribution','not-applicable','enable','cgcs-fs','enabled-active');
975
+INSERT INTO "SERVICE_DEPENDENCY" VALUES('action','cgcs-fs','not-applicable','disable','docker-distribution','disabled');
976
+INSERT INTO "SERVICE_DEPENDENCY" VALUES('action','docker-distribution','not-applicable','enable','management-ip','enabled-active');
977
+INSERT INTO "SERVICE_DEPENDENCY" VALUES('action','management-ip','not-applicable','disable','docker-distribution','disabled');
978
+INSERT INTO "SERVICE_ACTIONS" VALUES('docker-distribution','enable','lsb-script','','docker-distribution','start','',2,2,2,15,'');
979
+INSERT INTO "SERVICE_ACTIONS" VALUES('docker-distribution','disable','lsb-script','','docker-distribution','stop','',1,1,1,15,'');
980
+INSERT INTO "SERVICE_ACTIONS" VALUES('docker-distribution','audit-enabled','lsb-script','','docker-distribution','status','',2,2,2,15,40);
981
+INSERT INTO "SERVICE_ACTIONS" VALUES('docker-distribution','audit-disabled','lsb-script','','docker-distribution','status','',0,0,0,15,40);
982
+INSERT INTO "SERVICE_GROUP_MEMBERS" SELECT MAX(id) + 1,'no','controller-services','dockerdistribution-fs','critical' FROM "SERVICE_GROUP_MEMBERS";
983
+INSERT INTO "SERVICES" SELECT MAX(id) + 1,'no','dockerdistribution-fs','initial','initial','none','none',2,1,90000,4,16,'' FROM "SERVICES";
984
+INSERT INTO "SERVICE_DEPENDENCY" VALUES('action','dockerdistribution-fs','not-applicable','enable','drbd-dockerdistribution','enabled-active');
985
+INSERT INTO "SERVICE_DEPENDENCY" VALUES('action','docker-distribution','not-applicable','enable','dockerdistribution-fs','enabled-active');
986
+INSERT INTO "SERVICE_DEPENDENCY" VALUES('action','drbd-dockerdistribution','not-applicable','go-standby','dockerdistribution-fs','disabled');
987
+INSERT INTO "SERVICE_DEPENDENCY" VALUES('action','dockerdistribution-fs','not-applicable','disable','docker-distribution','disabled');
988
+INSERT INTO "SERVICE_ACTIONS" VALUES('dockerdistribution-fs','enable','ocf-script','heartbeat','Filesystem','start','',2,2,2,60,'');
989
+INSERT INTO "SERVICE_ACTIONS" VALUES('dockerdistribution-fs','disable','ocf-script','heartbeat','Filesystem','stop','',1,1,1,180,'');
990
+INSERT INTO "SERVICE_ACTIONS" VALUES('dockerdistribution-fs','audit-enabled','ocf-script','heartbeat','Filesystem','monitor','',2,2,2,60,40);
991
+INSERT INTO "SERVICE_ACTIONS" VALUES('dockerdistribution-fs','audit-disabled','ocf-script','heartbeat','Filesystem','monitor','',0,0,0,60,40);
992
+INSERT INTO "SERVICE_GROUP_MEMBERS" SELECT MAX(id) + 1,'no','controller-services','drbd-dockerdistribution','critical' FROM "SERVICE_GROUP_MEMBERS";
993
+INSERT INTO "SERVICES" SELECT MAX(id) + 1,'no','drbd-dockerdistribution','initial','initial','none','none',2,1,90000,4,16,'' FROM "SERVICES";
994
+INSERT INTO "SERVICE_ACTIONS" VALUES('drbd-dockerdistribution','enable','ocf-script','linbit','drbd','start','master_max=1,master_node_max=1,clone_max=2,clone_node_max=1,notify=true,globally_unique=false',2,2,2,90,'');
995
+INSERT INTO "SERVICE_ACTIONS" VALUES('drbd-dockerdistribution','disable','ocf-script','linbit','drbd','stop','master_max=1,master_node_max=1,clone_max=2,clone_node_max=1,notify=true,globally_unique=false',1,1,1,180,'');
996
+INSERT INTO "SERVICE_ACTIONS" VALUES('drbd-dockerdistribution','go-active','ocf-script','linbit','drbd','promote','master_max=1,master_node_max=1,clone_max=2,clone_node_max=1,notify=true,globally_unique=false',2,2,2,180,'');
997
+INSERT INTO "SERVICE_ACTIONS" VALUES('drbd-dockerdistribution','go-standby','ocf-script','linbit','drbd','demote','master_max=1,master_node_max=1,clone_max=2,clone_node_max=1,notify=true,globally_unique=false',2,2,2,180,'');
998
+INSERT INTO "SERVICE_ACTIONS" VALUES('drbd-dockerdistribution','audit-enabled','ocf-script','linbit','drbd','monitor','master_max=1,master_node_max=1,clone_max=2,clone_node_max=1,notify=true,globally_unique=false',2,2,2,20,30);
999
+INSERT INTO "SERVICE_ACTIONS" VALUES('drbd-dockerdistribution','audit-disabled','ocf-script','linbit','drbd','monitor','master_max=1,master_node_max=1,clone_max=2,clone_node_max=1,notify=true,globally_unique=false',0,0,0,20,28);
972 1000
 
973 1001
 update "SERVICE_ACTIONS" set TIMEOUT_IN_SECS=60 where action in ('enable', 'audit-enabled') and service_name = 'glance-registry';
974 1002
 

Loading…
Cancel
Save