如何在Appscale下发布自己的应用(一)

来源:互联网 发布:软件系统开发流程 编辑:程序博客网 时间:2024/04/28 11:00

本篇文章主要讲如何在本地搭建appscale环境。

由于国内的信息资源有限,很多重要的论坛被墙了,所以遇到不少麻烦,由于最近一段时间vpn也被封掉了,我只能通过特殊渠道方法来翻墙查阅资料,走了不少弯路。

1.先说系统和环境吧:

root@ubuntu:/usr/lib/ssl# lsb_release -aNo LSB modules are available.Distributor ID:UbuntuDescription:Ubuntu 14.04.5 LTSRelease:14.04Codename:trusty
root@ubuntu:/usr/lib/ssl# python -VPython 2.7.6

2. 下载appscale安装包:

wget -O – http://bootstrap.appscale.com | shapt-get install -y git-coreecho "start appscal ..."cd ~ && git clone  https://github.com/AppScale/appscale.git && cd appscale/debian  && bash -x appscale_build.shecho "start appscale-tools ..."cd ~ && git clone https://github.com/AppScale/appscale-tools.git && cd appscale-tools/debian && bash -x appscale_build.shecho "start appscale service ..."cd ~ && appscale init cluster


开始编辑~目录下的Appscalefile文件,修改

root@appscale-image0:~# cat ~/AppScalefile ---# The deployment strategy (roles -> machines) that should be used in this# AppScale deployment.# The following is a sample layout for running everything on one machine:ips_layout :  master : 192.168.1.143  appengine : 192.168.1.143  database : 192.168.1.143  zookeeper : 192.168.1.143# Alternatively, the following is a layout that separates everything onto# four machines:# ips_layout :#  master : 192.168.1.2#  appengine : 192.168.1.3#  database : 192.168.1.4#  zookeeper : 192.168.1.5# The previous two layouts only have one instance of each role running, so if# that machine fails, there is no backup to take its place. This layout uses# eight machines to provide failure resiliency:# ips_layout:#  master : 192.168.1.2#  appengine:#   - 192.168.1.3#   - 192.168.1.4#  database:#   - 192.168.1.5#   - 192.168.1.6#  zookeeper:  # zookeeper uses paxos, so it needs a majority up (hence 3)#   - 192.168.1.7#   - 192.168.1.8#   - 192.168.1.9# The search API is optional, and can be added with the "search" role.


修改成当前本机的ip地址,或者你想安装在哪个服务器的ip地址(前提是你得有这个服务器的访问权限)。

最后一步是启动了,也就是在~目录下执行appscale up


注意:还是要紧盯着bash -x appscale_build.sh这两个安装appscle和appscle-tools的操作,中间可能因为中国大陆的网络问题导致下载部分包失败或者超时的情况,所以如果中间失败了建议重新执行脚本安装,我就是在第一步安装appscle的时候失败了四五次,最后切换了代理才成功安装,如果appscle-tools安装很慢,主要是因为python官网上下载文件很慢,可以参考我的文章来修改镜像下载源 提高下载速度:

 http://blog.csdn.net/pbymw8iwm/article/details/77773723

 

最后一步执行appscale up的时候需要输入root密码,然后输入邮箱和密码,这个邮箱和密码就是后来你访问appscle主页需要登录的账户名和密码。最后一步可能需要4-10分钟不等,最后会输出你的appscle web页面地址:



阅读全文
1 0
原创粉丝点击