Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
Remove unsupported configuration options (#866)
Browse files Browse the repository at this point in the history
* Remove unsupported configuration options

* Fix plan names in test
  • Loading branch information
mrbrowning authored Apr 15, 2017
1 parent ce446e4 commit 15640d4
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 50 deletions.
38 changes: 12 additions & 26 deletions frameworks/cassandra/src/main/dist/svc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: {{SERVICE_NAME}}
scheduler:
principal: {{SERVICE_PRINCIPAL}}
user: {{SERVICE_USER}}
role: {{SERVICE_ROLE}}
zookeeper: {{SERVICE_ZK_SERVERS}}
pods:
node:
count: {{NODES}}
Expand Down Expand Up @@ -105,7 +103,7 @@ pods:
rm -r container-path/snapshot ;
./apache-cassandra-{{CASSANDRA_VERSION}}/bin/nodetool clearsnapshot -p {{TASKCFG_ALL_JMX_PORT}} -t "$SNAPSHOT_NAME" -- $(eval "echo $CASSANDRA_KEYSPACES")
resource-set: sidecar-resources
upload-schema-aws:
upload-schema-s3:
goal: FINISHED
cmd: >
chmod a+x {{S3CLI_VERSION}} && eval "echo \"$(sed 's/\"/\\\"/g' < s3config.json)\"" > config.json
Expand All @@ -118,7 +116,7 @@ pods:
(exit 1) ;
fi
resource-set: sidecar-resources
upload-snapshot-aws:
upload-snapshot-s3:
goal: FINISHED
cmd: >
chmod a+x {{S3CLI_VERSION}} && eval "echo \"$(sed 's/\"/\\\"/g' < s3config.json)\"" > config.json
Expand All @@ -131,14 +129,14 @@ pods:
(exit 1) ;
fi
resource-set: sidecar-resources
fetch-snapshot-aws:
fetch-snapshot-s3:
goal: FINISHED
cmd: >
chmod a+x {{S3CLI_VERSION}} && eval "echo \"$(sed 's/\"/\\\"/g' < s3config.json)\"" > config.json
./{{S3CLI_VERSION}} -c config.json get "${SNAPSHOT_NAME}_${POD_INSTANCE_INDEX}" container-path/snapshot.tar.gz
resource-set: sidecar-resources
fetch-schema-aws:
fetch-schema-s3:
goal: FINISHED
cmd: >
chmod a+x {{S3CLI_VERSION}} && eval "echo \"$(sed 's/\"/\\\"/g' < s3config.json)\"" > config.json
Expand All @@ -161,10 +159,6 @@ pods:
rm -r container-path/snapshot ;
rm container-path/snapshot.tar.gz
resource-set: sidecar-resources
upgradesstables:
goal: FINISHED
cmd: ./apache-cassandra-{{CASSANDRA_VERSION}}/bin/nodetool upgradesstables -a -p {{TASKCFG_ALL_JMX_PORT}} -- $CASSANDRA_KEYSPACE
resource-set: sidecar-resources
plans:
deploy:
strategy: serial
Expand All @@ -190,47 +184,39 @@ plans:
pod: node
steps:
- default: [[cleanup]]
backup-aws:
backup-s3:
strategy: serial
phases:
backup-schema:
strategy: serial
pod: node
steps:
- 0: [[backup-schema], [upload-schema-aws]]
- 0: [[backup-schema], [upload-schema-s3]]
create-snapshots:
strategy: parallel
pod: node
steps:
- default: [[snapshot]]
upload-snapshots:
strategy: parallel
strategy: {{BACKUP_RESTORE_STRATEGY}}
pod: node
steps:
- default: [[upload-snapshot-aws]]
restore-aws:
- default: [[upload-snapshot-s3]]
restore-s3:
strategy: serial
phases:
restore-schema:
strategy: serial
pod: node
steps:
- 0: [[fetch-schema-aws], [restore-schema]]
- 0: [[fetch-schema-s3], [restore-schema]]
fetch-snapshots:
strategy: parallel
strategy: {{BACKUP_RESTORE_STRATEGY}}
pod: node
steps:
- default: [[fetch-snapshot-aws]]
- default: [[fetch-snapshot-s3]]
restore-snapshots:
strategy: parallel
pod: node
steps:
- default: [[restore-snapshot]]
upgradesstables:
strategy: serial
phases:
upgradesstables-deploy:
strategy: serial
pod: node
steps:
- default: [[upgradesstables]]
8 changes: 4 additions & 4 deletions frameworks/cassandra/tests/test_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ def test_backup_and_restore_flow():
launch_and_verify_job(VERIFY_DATA_JOB)

# Run backup plan, uploading snapshots and schema to S3
plan.start_plan(PACKAGE_NAME, 'backup-aws', parameters=backup_parameters)
plan.start_plan(PACKAGE_NAME, 'backup-s3', parameters=backup_parameters)
spin.time_wait_noisy(
lambda: (
plan.get_plan(PACKAGE_NAME, 'backup-aws').json()['status'] ==
plan.get_plan(PACKAGE_NAME, 'backup-s3').json()['status'] ==
'COMPLETE'
)
)
Expand All @@ -68,10 +68,10 @@ def test_backup_and_restore_flow():
launch_and_verify_job(VERIFY_DELETION_JOB)

# Run restore plan, retrieving snapshots and schema from S3
plan.start_plan(PACKAGE_NAME, 'restore-aws', parameters=backup_parameters)
plan.start_plan(PACKAGE_NAME, 'restore-s3', parameters=backup_parameters)
spin.time_wait_noisy(
lambda: (
plan.get_plan(PACKAGE_NAME, 'restore-aws').json()['status'] ==
plan.get_plan(PACKAGE_NAME, 'restore-s3').json()['status'] ==
'COMPLETE'
)
)
Expand Down
13 changes: 0 additions & 13 deletions frameworks/cassandra/tests/test_maintenance_plans.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,3 @@ def test_repair_plan_completes():
'COMPLETE'
)
)


@pytest.mark.sanity
def test_upgrade_sstables_plan_completes():
upgrade_sstables_parameters = {'CASSANDRA_KEYSPACE': 'testspace1'}

plan.start_plan(PACKAGE_NAME, 'upgradesstables', parameters=upgrade_sstables_parameters)
spin.time_wait_noisy(
lambda: (
plan.get_plan(PACKAGE_NAME, 'upgradesstables').json()['status'] ==
'COMPLETE'
)
)
11 changes: 6 additions & 5 deletions frameworks/cassandra/universe/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@
"type": "string",
"default": "root"
},
"zk_servers": {
"description": "The comma-separated hostnames for the zookeeper clusters to retain scheduler state in",
"type": "string",
"default": "master.mesos:2181"
},
"mesos_api_version" : {
"description":"Configures the Mesos API version to use. Possible values: V0 (non-HTTP), V1 (HTTP)",
"type":"string",
Expand All @@ -49,6 +44,12 @@
"description": "A comma-separated list of seed nodes from other clusters in a multi-datacenter deployment",
"type": "string",
"default": ""
},
"backup_restore_strategy": {
"description": "Strategy to use for uploading/downloading backups {serial, parallel}",
"type": "string",
"enum": ["serial", "parallel"],
"default": "serial"
}
},
"required": [
Expand Down
3 changes: 1 addition & 2 deletions frameworks/cassandra/universe/marathon.json.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@
"env": {
"SERVICE_NAME": "{{service.name}}",
"SERVICE_USER": "{{service.user}}",
"SERVICE_ROLE": "{{service.role}}",
"SERVICE_PRINCIPAL": "{{service.principal}}",
"CASSANDRA_VERSION": "3.0.10",
"SERVICE_ZK_SERVERS": "{{service.zk_servers}}",
"S3CLI_VERSION": "s3cli-0.0.55-linux-amd64",
{{#service.secret_name}}
Expand Down Expand Up @@ -136,6 +134,7 @@
"JAVA_URI": "{{resource.assets.uris.jre-tar-gz}}",
"CASSANDRA_LOCATION_DATA_CENTER": "{{service.data_center}}",
"CASSANDRA_LOCATION_RACK": "{{service.rack}}",
"BACKUP_RESTORE_STRATEGY": "{{service.backup_restore_strategy}}",
"CONFIG_TEMPLATE_PATH": "cassandra-scheduler"
},
"uris": [
Expand Down

0 comments on commit 15640d4

Please sign in to comment.