Skip to main content

阿里云 swarm SDK

Project description

#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')

Project details


Release history Release notifications | RSS feed

This version

4.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aliyun_swarm_sdk-v4.2.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

aliyun_swarm_sdk-4.2-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file aliyun_swarm_sdk-v4.2.tar.gz.

File metadata

  • Download URL: aliyun_swarm_sdk-v4.2.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for aliyun_swarm_sdk-v4.2.tar.gz
Algorithm Hash digest
SHA256 24f8db69d8a316e8a063732dc59fe00a9f5ff2d1fba86eaa18b8c1a95d26ec93
MD5 9f7ab9aa4c3fccd416099086a5dd5aee
BLAKE2b-256 81d21af9642dd19036f95d5124ed1d8ee702106c04f0179a43521d1d9e32ec75

See more details on using hashes here.

File details

Details for the file aliyun_swarm_sdk-4.2-py3-none-any.whl.

File metadata

  • Download URL: aliyun_swarm_sdk-4.2-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for aliyun_swarm_sdk-4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f12f09026a179cc45591fc4a33f7a31c61cfa9380b8433f24c05a90c2787b4c1
MD5 2d2c4917a502f49a50d20b6ea8a415e9
BLAKE2b-256 296952b4ee2c0ff8f83aba3d915e16986d55bf25da6435d1203e38bea288f24b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page