Skip to content

Alicloud setup

Brian Wandell edited this page Oct 23, 2017 · 7 revisions

Alibaba Cloud has a command line utility, ossutil, for various platforms that enables copying files between your local computer and our storage on the cloud. It also has a method for resource orchestration services (ros). This page describes how to download, install, and test these utilities. In Alicloud we describe the Matlab functions that use these utilities to move data, start k8s clusters, and run docker computations.

Install ossutil

The ossutil download page is here. When we downloaded to the /Applications folder on the MAC, the permissions were not correct. As they suggest on the page we had to set the permissions from the command line. Also, we moved the file to the more generic name, ossutil.

cd /Applications
chmod 755 ossutilmac64
mv ossutilmac64 ossutil

Note: We are using the ossutil function. While this is not a complete tool, it has the functionality we need at this point. Alibaba recommends using this rather than osscmd which works within Python.

The Wandell Lab account on Alibaba Cloud

The general instructions for configuring your Alibaba OSS Services are here. What we did was run the configuration utility, which poses a set of questions

ossutil config
./ossutil config -L en

Please enter the config file path(default /Users/wandell/.ossutilconfig, carriage return 
will use the default path. 
If you specified this option to other path, you should specify --config-file option 
to the path when you use other commands):

No config file entered, will use the default config file /Users/wandell/.ossutilconfig

For the following settings, carriage return means skip the configuration. 
Please try "help config" to see the meaning of the settings.

Please enter language(CH/EN, default is:CH, the configuration will go into effect after the command successfully executed):EN
Please enter accessKeySecret: ******
Please enter stsToken: (leave this blank)
Please enter endpoint:oss-us-west-1.aliyuncs.com
Please enter accessKeyID: *******
To get the token for the Wandell Lab see Zhenyi.  

We are using ossutil to set up access to all Alibaba Cloud services (kubernetes and data storage services).

You can test that ossutil and the acloud Matlab objects are installed correctly using the Matlab validation script

v_acloudTest

Install ros

The quick installation for ros is here. The best way on a MAC is to use pip (If you don't have pip, we suggest you get it. The Internet is filled with tutorials on how to do this.)

pip install aliyun-ros-cli

Note: Alibaba only supports Python 2.7, not the later versions. Yes, we know that Python is infinitely superior in all ways to Matlab.

To configure ros you must have Python 2.7 installed (for example Anaconda is popular). You can set your user data for ros with this command

python <full path to ros>

You will be queried for the access-key, access-secret and us-west-1.

Please set Aliyun access info first.
Enter your access key id: <string here>
Enter your access key secret, without quote: <string here>
Enter default region id, without quote:us-west-1
Write : /Users/wandell/anaconda/ros/ros.conf

Please get the access-key and access-secret from Zhenyi (or Brian).

Instructions for using the ROS utility are here.

Additional resources

Alibaba App

There is a GUI for the ossutil accessible, you can download it here. We are not (yet) encouraging the use of this app.

Kubernetes

We used this alibaba page instructions to build up an ECS (elastic compute service) cluster that works with kubernetes (k8s). It is k8s because there is a convention to use the first letter, the number of in between letters, and the last letter. But you shouldn't have to use these instructions. If life is good, the Matlab acloud class will start up and stop your k8s clusters.

Clone this wiki locally