V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Recommended Services
Amazon Web Services
LeanCloud
New Relic
ClearDB
ujmxyd
V2EX  ›  云计算

现在有哪些支持 Python 3 的 PaaS?

  •  
  •   ujmxyd · 2016-02-07 16:08:35 +08:00 · 5396 次点击
    这是一个创建于 3002 天前的主题,其中的信息可能已经有所发展或是发生改变。

    自己写了个小应用,需要和国内的一台服务器通信。 Python 3 写的,框架是 Django 。不太想换成 Python 2.7
    因为之前在 OpenShift 上跑过一些 PHP 程序,所以想把它放在 OpenShift 上。有点不爽的是,它只有Python 3.3 的环境,构建时 pip 安装的 Django 居然还是 1.8.5 。忍了,试着登录(需要访问那个服务器的 3000 端口),结果报错[Errno 13] Permission denied。好像是他们的 SELinux 配置干的。也想过在 GAE 上搭一个专门用来“转发” 3000 端口的东西,但感觉太麻烦,且没什么头绪。
    然后我把它放到 Heroku 上了。这儿有Python 3.5 的环境官方提供的 Django 1.9 模板,以及看起来更好的文档。然而免费应用每天只能运行 18 小时,且响应速度能感觉到比 OpenShift 上的慢。
    后来看了看 IBM Bluemix ,看起来很美好,不知有没有坑。
    不知各位能不能推荐一些?高中生,尽量便宜些吧。
    顺便问一下:如果使用国内各种 Engine 的国内服务器,必须备案吗?

    第 1 条附言  ·  2016-02-08 19:03:19 +08:00
    各位新年快乐
    最后选择了 IBM Bluemix , Cloud Foundry 的运行时。找资料的时候可以去看看 Heroku 的,有些相同的地方。
    以后可能会迁到国内的 Docker 上吧。
    第 2 条附言  ·  2016-02-09 21:11:12 +08:00

    我给他们发的 request 有回应了:

    Hi xxx,

    I'm sorry, I thought the port 3000 is available for outbound connections, but it is indeed blocked by an SElinux policy that's in place.
    I don't have a complete list of allowed ports for outbound connections, but here's a list of SElinux labels that specify opened ports on OpenShift Online per the current configuration:
    61pki_ca_port
    amqp_port
    commplex_port
    flash_port
    ftp_port
    generic_port
    git_port
    http_cache_port
    http_port
    ircd_port
    jabber_client_port
    jacorb_port
    jboss_debug_port
    jboss_management_port
    jboss_messaging_port
    memcache_port
    mongod_port
    mssql_port
    munin_port
    mysqld_port
    oracle_port
    pki_ra_port
    pop_port
    postgresql_port
    pulseaudio_port
    smtp_port
    soundd_port
    ssh_port
    virt_migration_port
    whois_port

    You've tested this on the gear using curl, which returned 'permission denied' rather than 'connection refused', indicating that it's denied by a local policy not blocked by the remote server.
    You can also test the port availability using telnet, but please make sure not to do that programatically in rapid succession. Scanning open ports will surely be detected and the account may be blocked.

    Best regards,

    Jiri
    OpenShift Customer Success Team
    OpenShift Online by Red Hat, Inc.

    只知道了这些 SELinux 标签,也算是有些用吧。

    14 条回复    2016-02-08 21:31:16 +08:00
    Strikeactor
        1
    Strikeactor  
       2016-02-07 16:33:23 +08:00   ❤️ 2
    灵雀云不用备, TAE 送俩免费容器不过绑域名必需阿里系备案

    openshift 可以选 DIY 空间完全自己编译环境。不知道你说的访问 3000 端口是什么意思,从 openshift 访问别的服务器的 3000 端口应该不会有限制,如果你要在 openshift 监听 3000 端口的话 Permission denied 挺正常的,监听只有一个范围的端口可以用,你想本地访问被监听端口的话还得用 rhc 在本地映射端口,这个他们文档里有说。

    heroku 以前只是会休眠,现在每天强制休眠 6 小时也的确不好朝上边放了。 openshift 其实也有休眠,只是空闲时间是按天算的,你要长期运行最好用脚本时不时的去访问一下。 bluemix 挺良心的,有俩免费公网 IP 和 512M 容器。坑的话,主要是现在被刷的多了,貌似开始拒绝中国信用卡做验证,以及容器即使加了暴露端口,非常用端口还是会连不上( ngrok 服务端默认的 4443 就死活连不上,换 3306 就好了),还有控制面板老崩,各种崩,崩得你怀疑人生。。
    VmuTargh
        2
    VmuTargh  
       2016-02-07 17:09:10 +08:00
    @Strikeactor openshift 的 DIY 环境里面 10000 以上的不会被占用
    ujmxyd
        3
    ujmxyd  
    OP
       2016-02-07 17:12:12 +08:00
    @Strikeactor 是从 OpenShift 访问别的服务器的 3000 端口

    curl -v some.domain
    * About to connect() to some.domain port 80 (#0)
    * Trying 123.45.67.89... connected
    * Connected to some.domain (123.45.67.89) port 80 (#0)
    > GET / HTTP/1.1
    ***省略***

    curl -v some.domain:3000
    * About to connect() to some.domain port 3000 (#0)
    * Trying 123.45.67.89... Failed to connect to 123.45.67.89: Permission denied
    * Success
    * couldn't connect to host
    * Closing connection #0
    curl: (7) Failed to connect to 123.45.67.89: Permission denied
    VmuTargh
        4
    VmuTargh  
       2016-02-07 17:19:44 +08:00
    @ujmxyd 果然不行,刚才试了试
    ujmxyd
        5
    ujmxyd  
    OP
       2016-02-07 17:26:40 +08:00
    好像可以试试国内那些托管 Docker 容器的
    VmuTargh
        6
    VmuTargh  
       2016-02-07 17:26:47 +08:00
    @Strikeactor
    @ujmxyd
    高位端口可以,但是低于那个范围的就绝对不行
    VmuTargh
        7
    VmuTargh  
       2016-02-07 17:28:54 +08:00   ❤️ 1
    @ujmxyd
    curl -v my[数据删除].cc:25565
    * About to connect() to my[数据删除].cc port 25565 (#0)
    * Trying 61.164.253.172... connected
    * Connected to my[数据删除].cc ([数据删除]) port 25565 (#0)
    > GET / HTTP/1.1
    > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.18 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
    > Host: my[数据删除].cc:25565
    > Accept: */*
    >
    * Empty reply from server
    * Connection #0 to host my[数据删除].cc left intact
    curl: (52) Empty reply from server
    * Closing connection #0

    curl -v boutell.com:3000
    * About to connect() to boutell.com port 3000 (#0)
    * Trying 69.195.198.241... Failed to connect to 69.195.198.241: Permission denied
    * Success
    * couldn't connect to host
    * Closing connection #0
    curl: (7) Failed to connect to 69.195.198.241: Permission denied
    octopus_new
        8
    octopus_new  
       2016-02-07 18:48:05 +08:00   ❤️ 1
    amazon elastic beanstalk docker container
    amazon EC2 container service
    sdjkx
        9
    sdjkx  
       2016-02-08 04:12:27 +08:00
    techmoe
        10
    techmoe  
       2016-02-08 08:20:03 +08:00 via Android   ❤️ 1
    openshift 有 DIY 环境可以自己配置环境进去,想转发端口的话拿 ssh 登上应用,在里面用 ngrok 转发端口(后面加-proto=tcp 3000 ),这里有一个国内可用的 ngrok 转发服地址→ngrok.cc ,另外如果想让 openshift 永远在线的话可以去淘宝买张循环信用卡然后认证铜牌计划(教程→ http://lolicookie.herokuapp.com/shi-yong-xu-ni-xin-yong-qia-ren-zheng-openshifttong-pai-ji-hua/
    总的来说 openshift 还是很良心的,如果嫌速度慢的话可以去用 inscapsula 的免费配额强制绑到他们的香港 cdn ,那样速度真的可以媲美国内机器了
    techmoe
        11
    techmoe  
       2016-02-08 08:21:22 +08:00 via Android
    如果你要是想直接拿应用的 IP 连 3000 端口那基本是不可能的, openshift 只开放了 22 端口和 80 端口出来
    techmoe
        12
    techmoe  
       2016-02-08 08:22:20 +08:00 via Android
    并且它好像有个反代的什么东西档在前面(啊啊啊啊啊啊手机客户端不能回车好想吐槽啊.........)
    ujmxyd
        13
    ujmxyd  
    OP
       2016-02-08 10:23:19 +08:00
    @techmoe 先谢谢了。
    是的。 ngrok 对这种情况并没有什么用。所以昨天把它移到了 Bluemix 上了。
    mikicomo
        14
    mikicomo  
       2016-02-08 21:31:16 +08:00
    腾讯云貌似打算也要加入 Paas 了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   885 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 21:29 · PVG 05:29 · LAX 14:29 · JFK 17:29
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.