Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1. support 2 controller node; 2. support software version; 3. support… #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
.DS_Store
*/.DS_Store
*/.DS_Store
scripts/build/
scripts/dist/
*.spec
app/app.zip
scripts/build.sh
scripts/build_hpc.sh
scripts/synctl.sh
scripts/sync_hpc.sh
85 changes: 81 additions & 4 deletions app/cluster.json.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"container": {
"type": "kvm",
"zone": "nscc",
"image": "img-s17drl1r"
"image": "img-y01axmq5"
},
"net": {
"vxnet": true,
Expand Down Expand Up @@ -47,7 +47,7 @@
"container": {
"type": "kvm",
"zone": "nscc",
"image": "img-s17drl1r"
"image": "img-y01axmq5"
},
"net": {
"vxnet": false,
Expand Down Expand Up @@ -98,7 +98,7 @@
"cmd": "userctl reset_passwd",
"timeout": 180,
"service_params": {
"user_name": {{service_params.controller_sp.user_name}},
"username": {{service_params.controller_sp.user_name}},
"password": {{service_params.controller_sp.password}},
"new_password": {{service_params.controller_sp.new_password}}
}
Expand All @@ -118,6 +118,78 @@
"service_params": {
"software": {{service_params.controller_sp.software}}
}
},
"add_queue": {
"type": "custom",
"cmd": "queuectl add_queue",
"timeout": 600,
"service_params": {
"queue": {{service_params.controller_sp.queue}}
}
},
"del_queue": {
"type": "custom",
"cmd": "queuectl del_queue",
"timeout": 3600,
"service_params": {
"queue": {{service_params.controller_sp.queue}}
}
},
"modify_queue": {
"type": "custom",
"cmd": "queuectl modify_queue",
"timeout": 600,
"service_params": {
"queue": {{service_params.controller_sp.queue}}
}
},
"create_job_file": {
"type": "custom",
"cmd": "jobctl create_job_file",
"timeout": 600,
"service_params": {
"job": {{service_params.controller_sp.job}}
}
},
"submit_job": {
"type": "custom",
"cmd": "jobctl submit",
"timeout": 600,
"service_params": {
"job": {{service_params.controller_sp.job}}
}
},
"start_job": {
"type": "custom",
"cmd": "jobctl start",
"timeout": 600,
"service_params": {
"job": {{service_params.controller_sp.job}}
}
},
"get_job": {
"type": "custom",
"cmd": "jobctl get",
"timeout": 600,
"service_params": {
"job": {{service_params.controller_sp.job}}
}
},
"stop_job": {
"type": "custom",
"cmd": "jobctl stop",
"timeout": 600,
"service_params": {
"job": {{service_params.controller_sp.job}}
}
},
"del_job": {
"type": "custom",
"cmd": "jobctl del",
"timeout": 600,
"service_params": {
"job": {{service_params.controller_sp.job}}
}
}
}
},{
Expand All @@ -126,7 +198,7 @@
"container": {
"type": "kvm",
"zone": "nscc",
"image": "img-s17drl1r"
"image": "img-y01axmq5"
},
"net": {
"vxnet": false,
Expand Down Expand Up @@ -165,12 +237,17 @@
"admin_user_id": {{env.admin.user_id}},
"admin_group_id": {{env.admin.group_id}},
"nas_path": {{env.nas_path}},
"nas_mount_point": {{cluster.login.nas_mount_point}},
"software": {{env.software}}
},
"display_tabs" : {
"cluster_user" : {
"cmd" : "userctl list",
"roles_to_execute_on": ["controller"]
},
"get_queue" : {
"cmd" : "queuectl get_queue",
"roles_to_execute_on": ["controller"]
}
},
"health_check": {
Expand Down
66 changes: 40 additions & 26 deletions app/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"label": "NAS_ID",
"description": "nas id",
"type": "string",
"default": "pu46atpam",
"default": "cv0axfkg",
"required": "yes"
},{
"key": "login",
Expand Down Expand Up @@ -146,8 +146,8 @@
"label": "ControllerCount",
"description": "Number of controller nodes for the cluster to create",
"type": "integer",
"default": 1,
"range": [1],
"default": 2,
"range": [1,2],
"required": "yes"
}]
},{
Expand Down Expand Up @@ -216,30 +216,44 @@
"description": "Custom service the role(controller) configuration properties",
"type": "array",
"properties": [{
"key": "user_name",
"label": "User Name",
"description": "The name of the user",
"type": "string",
"default": "",
"required": "yes"
},{
"key": "password",
"label": "Password",
"description": "password of the user",
"type": "password",
"required": "yes"
},{
"key": "new_password",
"label": "New Password",
"description": "new password of the user to reset",
"type": "password",
"required": "yes"
"key": "user_name",
"label": "User Name",
"description": "The name of the user",
"type": "string",
"default": "",
"required": "yes"
},{
"key": "password",
"label": "Password",
"description": "password of the user",
"type": "password",
"required": "yes"
},{
"key": "new_password",
"label": "New Password",
"description": "new password of the user to reset",
"type": "password",
"required": "yes"
},{
"key": "software",
"label": "Software",
"description": "the install/uninstall software list",
"type": "string",
"required": "yes"
"key": "software",
"label": "Software",
"description": "the install/uninstall software list",
"type": "string",
"required": "yes"
},{
"key": "queue",
"label": "queue",
"description": "the queue list for add/remove/modify/get cluster queues",
"type": "string",
"default": "",
"required": "no"
},{
"key": "job",
"label": "job",
"description": "the job param for createjobfile/submit/get/start/stop/del cluster hpc jobs",
"type": "string",
"default": "",
"required": "no"
}]
}]
}, {
Expand Down
52 changes: 52 additions & 0 deletions hpc-app/cluster.json.mustache
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"name": {{cluster.name}},
"description": {{cluster.description}},
"upgrading_policy": "parallel",
"vxnet": {{cluster.vxnet}},
"nas_id": {{cluster.nas_id}},
"nodes": [{
"role":"login",
"os_reset": false,
"container": {
"type": "kvm",
"zone": "nscc",
"image": "img-lnjkiq87"
},
"net": {
"vxnet": true,
"ib": true,
"base": false
},
"instance_class": {{cluster.login.instance_class}},
"nas_mount_point": {{cluster.login.nas_mount_point}},
"cpu": {{cluster.login.cpu}},
"cpu_model": {{cluster.login.cpu_model}},
"memory": {{cluster.login.memory}},
"count": {{cluster.login.count}},
"user_access": true,
"advanced_actions": ["scale_horizontal", "associate_eip"],
"services": {
"init": {
"cmd": "appctl.hpc init"
},
"reset_password": {
"type": "custom",
"cmd": "appctl.hpc reset_passwd",
"timeout": 180,
"service_params": {
"username": {{service_params.loginnode.username}},
"password": {{service_params.loginnode.password}},
"new_password": {{service_params.loginnode.new_password}}
}
}
}
}],
"env": {
"user": {{env.admin.user}},
"password": {{env.admin.password}},
"user_id": {{env.admin.user_id}},
"group_id": {{env.admin.group_id}},
"nas_path": {{env.nas_path}},
"nas_mount_point": {{cluster.login.nas_mount_point}}
}
}
Loading