#create_application=====================================================================
"""
data = {
"name": "nginx",
"description": "This is a test application",
'template': 'version: \'2\'\r\nservices: \r\n nginx4:\r\n volumes:\r\n - /data/servicesLog:/data/servicesLog\r\n image: "xxxx"\r\n restart: always\r\n environment:\r\n - msjvm="2048"\r\n - mxjvm="2048"\r\n - env_tag=prod\r\n command: ["/bin/sh","/usr/local/run.sh"]\r\n labels:\r\n aliyun.routing.port_8080: nginx4;http://nginx4.xxxx.com\r\n aliyun.routing.session_sticky: false\r\n aliyun.global: true',
"version": "1.0",
}
Swarm_Object.create_application('https://xxxxxxxxxxx:20180', 'ca.pem', 'cert.pem', 'key.pem', data)
"""
#update_application
"""
data = {
"description": "This is a test application",
'template': 'version: \'2\'\r\nservices: \r\n nginx4:\r\n volumes:\r\n - /data/servicesLog:/data/servicesLog\r\n image: "docker.wanshifu.com:5000/worker"\r\n restart: always\r\n environment:\r\n - msjvm="2048"\r\n - mxjvm="2048"\r\n command: ["/bin/sh","/usr/local/run.sh"]\r\n labels:\r\n aliyun.routing.port_8080: nginx4;http://nginx4.wanshifu.com\r\n aliyun.routing.session_sticky: false\r\n aliyun.global: true',
"version": "4.0",
}
Swarm_Object.update_application('https://xxxxxxxxxxx:20180', 'ca.pem', 'cert.pem', 'key.pem', data, 'nginx' )
"""
#update_application
"""
data = {
"update_method": "blue-green",
"description": "This is a test application",
'template': 'version: \'2\'\r\nservices: \r\n nginx8:\r\n volumes:\r\n - /data/servicesLog:/data/servicesLog\r\n image: "docker.wanshifu.com:5000/worker"\r\n restart: always\r\n environment:\r\n - msjvm="2048"\r\n - mxjvm="2048"\r\n command: ["/bin/sh","/usr/local/run.sh"]\r\n labels:\r\n aliyun.routing.port_8080: nginx4;http://nginx4.wanshifu.com\r\n aliyun.routing.session_sticky: false\r\n aliyun.global: true',
"version": "5.0",
}
Swarm_Object.update_application('https://xxxxxxxxxxx:20180', 'ca.pem', 'cert.pem', 'key.pem', data, 'nginx')
"""
#update_confirmation
#Swarm_Object.update_confirmation('https://xxxxxxxxxxx:20180', 'ca.pem', 'cert.pem', 'key.pem','nginx')
#redeploy_application
"""redeploy_application"""
#Swarm_Object.redeploy_application('https://xxxxxxxxxxx:20180', 'ca.pem', 'cert.pem', 'key.pem', 'nginx')
#stop_application
#Swarm_Object.stop_application('https://xxxxxxxxxxx:20180', 'ca.pem', 'cert.pem', 'key.pem', 'nginx')
#start_application
#Swarm_Object.start_application('https://xxxxxxxxxxx:20180', 'ca.pem', 'cert.pem', 'key.pem', 'nginx')
#kill_application
#Swarm_Object.kill_application('https://xxxxxxxxxxx:20180', 'ca.pem', 'cert.pem', 'key.pem', 'nginx')
#delete_application
#Swarm_Object.delete_application('https://xxxxxxxxxxx:201801', 'ca.pem', 'cert.pem', 'key.pem', 'nginx')
"""
data = {
"name": "nginx",
"description": "This is a test application",
'template': 'version: \'2\'\r\nservices: \r\n nginx4:\r\n volumes:\r\n - /data/servicesLog:/data/servicesLog\r\n image: "xxxx"\r\n restart: always\r\n environment:\r\n - msjvm="2048"\r\n - mxjvm="2048"\r\n - env_tag=prod\r\n command: ["/bin/sh","/usr/local/run.sh"]\r\n labels:\r\n aliyun.routing.port_8080: nginx4;http://nginx4.xxxx.com\r\n aliyun.routing.session_sticky: false\r\n aliyun.global: true',
"version": "1.0",
}
Swarm_Object.create_application('https://xxxxxxxxxxx:20180', 'ca.pem', 'cert.pem', 'key.pem', data)
"""
#update_application
"""
data = {
"description": "This is a test application",
'template': 'version: \'2\'\r\nservices: \r\n nginx4:\r\n volumes:\r\n - /data/servicesLog:/data/servicesLog\r\n image: "docker.wanshifu.com:5000/worker"\r\n restart: always\r\n environment:\r\n - msjvm="2048"\r\n - mxjvm="2048"\r\n command: ["/bin/sh","/usr/local/run.sh"]\r\n labels:\r\n aliyun.routing.port_8080: nginx4;http://nginx4.wanshifu.com\r\n aliyun.routing.session_sticky: false\r\n aliyun.global: true',
"version": "4.0",
}
Swarm_Object.update_application('https://xxxxxxxxxxx:20180', 'ca.pem', 'cert.pem', 'key.pem', data, 'nginx' )
"""
#update_application
"""
data = {
"update_method": "blue-green",
"description": "This is a test application",
'template': 'version: \'2\'\r\nservices: \r\n nginx8:\r\n volumes:\r\n - /data/servicesLog:/data/servicesLog\r\n image: "docker.wanshifu.com:5000/worker"\r\n restart: always\r\n environment:\r\n - msjvm="2048"\r\n - mxjvm="2048"\r\n command: ["/bin/sh","/usr/local/run.sh"]\r\n labels:\r\n aliyun.routing.port_8080: nginx4;http://nginx4.wanshifu.com\r\n aliyun.routing.session_sticky: false\r\n aliyun.global: true',
"version": "5.0",
}
Swarm_Object.update_application('https://xxxxxxxxxxx:20180', 'ca.pem', 'cert.pem', 'key.pem', data, 'nginx')
"""
#update_confirmation
#Swarm_Object.update_confirmation('https://xxxxxxxxxxx:20180', 'ca.pem', 'cert.pem', 'key.pem','nginx')
#redeploy_application
"""redeploy_application"""
#Swarm_Object.redeploy_application('https://xxxxxxxxxxx:20180', 'ca.pem', 'cert.pem', 'key.pem', 'nginx')
#stop_application
#Swarm_Object.stop_application('https://xxxxxxxxxxx:20180', 'ca.pem', 'cert.pem', 'key.pem', 'nginx')
#start_application
#Swarm_Object.start_application('https://xxxxxxxxxxx:20180', 'ca.pem', 'cert.pem', 'key.pem', 'nginx')
#kill_application
#Swarm_Object.kill_application('https://xxxxxxxxxxx:20180', 'ca.pem', 'cert.pem', 'key.pem', 'nginx')
#delete_application
#Swarm_Object.delete_application('https://xxxxxxxxxxx:201801', 'ca.pem', 'cert.pem', 'key.pem', 'nginx')
Release files for aliyun-swarm-sdk 4.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aliyun_swarm_sdk-v4.2.tar.gz | 2.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aliyun_swarm_sdk-4.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.2 kB
Release files / aliyun_swarm_sdk-v4.2.tar.gz
| Download URL | aliyun_swarm_sdk-v4.2.tar.gz |
|---|---|
| Size | 2.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
24f8db69d8a316e8a063732dc59fe00a9f5ff2d1fba86eaa18b8c1a95d26ec93
|
|
BLAKE2b-256 checksum How to use checksums |
81d21af9642dd19036f95d5124ed1d8ee702106c04f0179a43521d1d9e32ec75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.6
|
Release files / aliyun_swarm_sdk-4.2-py3-none-any.whl
| Download URL | aliyun_swarm_sdk-4.2-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f12f09026a179cc45591fc4a33f7a31c61cfa9380b8433f24c05a90c2787b4c1
|
|
BLAKE2b-256 checksum How to use checksums |
296952b4ee2c0ff8f83aba3d915e16986d55bf25da6435d1203e38bea288f24b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.6
|