此博文介绍华南理工大学软件学院“云计算开发与应用”实验课。本人在大二期间选修了这门课,实验课内容是把已有的app部署到云服务器上运行。虽然实验内容很简单(作者大概一个小时就做完了两天的实验内容),但觉得这次实验是我在华工期间做过的为数不多有意义的实验之一,故作此博客记录实验详细过程。此博客以linux环境为准。

实验所需材料与环境配置:

本地环境:Manjaro 18.0.4 (kernel version: x86_64 Linux 5.0.15-1-MANJARO)。需先生成ssh密钥对以便访问服务器。需要安装node.js。

云服务器:IBM LinuxONE Community Cloud。登录/注册地址:https://linuxone.cloud.marist.edu/cloud/#/login

IBM账户(登录/注册地址:https://developer.ibm.com/linuxone/ ),一个自己的github账号。

Day 1:

先到IBM LinuxONE Community Cloud注册账号。因为是人工审核,所以注册流程比想象中要久一些。登录之后就可以看到这样的界面:华工软院IBM LinuxONE Community Cloud云计算实验文档

我们不着急去创建实例,先去右上角的个人用户设置,把本地生成的id_rsa.pub公钥文件上传上去。(什么你告诉我你不会?还不赶紧学?)

新创建的账户最上方不会有Containers的选项,不用管。点击Virtual Server就可以看到下面的界面,右边的Quota显示我们最多只能创建一个vm实例。点击黄色的Create按钮,来创建我们第一个vm实例。华工软院IBM LinuxONE Community Cloud云计算实验文档

点击Create之后稍等一会(可能有点久,要手动刷新一下),就可以看到我们的vm已经准备就绪了。华工软院IBM LinuxONE Community Cloud云计算实验文档

启动terminal,ssh linux1@ip连接到我们的vm实例。

ssh linux1@148.100.244.30
The authenticity of host '148.100.244.30 (148.100.244.30)' can't be established.
ECDSA key fingerprint is SHA256:JPXviVE88jNGDCGvyFFg1iVyQ1fngC6V78pqJCsKCrg.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '148.100.244.30' (ECDSA) to the list of known hosts.
==============================================================================
Welcome to IBM LinuxONE Community Cloud!

This server is for authorized users only. All activity is logged and monitored.
Individuals using this server must abide to the Terms and Conditions listed here:
https://developer.ibm.com/linuxone/terms-of-use/
Your access will be revoked for any non-compliance.
=============================================================================

View Code