hyperhq / hypercli

Command line tool for the Hyper.sh platform.
https://hyper.sh
Apache License 2.0
168 stars 40 forks source link

various compatibility issues #184

Open errordeveloper opened 7 years ago

errordeveloper commented 7 years ago

The following file works fine with Docker:

version: '2'

services:
  front-end:
    image: weaveworksdemos/front-end
    hostname: front-end
    restart: always
  edge-router:
    image: weaveworksdemos/edge-router
    ports:
      - '80:80'
    hostname: edge-router
    restart: always
  catalogue:
    image: weaveworksdemos/catalogue
    hostname: catalogue
    restart: always
  catalogue-db:
    image: weaveworksdemos/catalogue-db
    hostname: catalogue-db
    restart: always
    environment:
      - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
      - MYSQL_ALLOW_EMPTY_PASSWORD=true
      - MYSQL_DATABASE=socksdb
  cart:
    image: weaveworksdemos/cart
    hostname: cart
    restart: always
  cart-db:
    image: mongo
    hostname: cart-db
    restart: always
  orders:
    image: weaveworksdemos/orders
    hostname: orders
    restart: always
  orders-db:
    image: mongo
    hostname: orders-db
    restart: always
  shipping:
    image: weaveworksdemos/shipping
    hostname: shipping
    restart: always
  rabbitmq:
    image: rabbitmq:3
    hostname: rabbitmq
    restart: always
  payment:
    image: weaveworksdemos/payment
    hostname: payment
    restart: always
  user:
    image: weaveworksdemos/user
    hostname: user
    restart: always
    environment:
      - MONGO_HOST=user-db:27017
  user-db:
    image: weaveworksdemos/user-db
    hostname: user-db
    restart: always
  user-sim:
    image: weaveworksdemos/load-test
    hostname: user-simulator
    command: "-d 60 -r 200 -c 2 -h edge-router"

However, it doesn't just work with hyper compose up -d. I had to start containers individually with hyper compose up -p sockshop -d <container-name>.

The orders and cart containers consistently fail to start with (yet they start just find with hyper run):

Error response from daemon: No command specified

Also, I've seen this error appeared randomly:

Error response from daemon: Rbd device 426d65c74af472be4c0bbe442f5c0b03ca258dcb827ebc50f45ef8f39e3b5526 does not exist
errordeveloper commented 7 years ago

Also something goes wrong with MySQL:

> hyper compose up -p sockshop catalogue-db
WARN[0000] The MYSQL_ROOT_PASSWORD variable is not set. Substituting a blank string. 
(This is an existing compose project)
Project [sockshop]: Starting project 
[12/14] [catalogue-db]: Starting 
[12/14] [catalogue-db]: Started 

Project [sockshop]: Project started 
catalogue-db-1 | 2016-12-12T11:23:54.097280Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
catalogue-db-1 | 2016-12-12T11:23:54.103952Z 0 [Note] mysqld (mysqld 5.7.16) starting as process 6 ...
catalogue-db-1 | 2016-12-12T11:23:54.129171Z 0 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
catalogue-db-1 | 
catalogue-db-1 | 2016-12-12T11:23:54.132764Z 0 [ERROR] Aborting
catalogue-db-1 | 
catalogue-db-1 | 2016-12-12T11:23:54.134927Z 0 [Note] Binlog end
catalogue-db-1 | 2016-12-12T11:23:54.138974Z 0 [Note] mysqld: Shutdown complete
catalogue-db-1 | 

However, using miriadb image instead appears to work.

errordeveloper commented 7 years ago

Example of random RBD error:

> hyper compose up -p sockshop catalogue
WARN[0000] The MYSQL_ROOT_PASSWORD variable is not set. Substituting a blank string. 
(This is an existing compose project)
Project [sockshop]: Starting project 
[11/14] [catalogue]: Starting 
Project [sockshop]: Project started 
Error response from daemon: Rbd device 604573520ebc276f379c0a2a4c6deca52729865576ab26ba9305fc113f4f3580 does not exist

> hyper compose up -p sockshop -d catalogue
WARN[0000] The MYSQL_ROOT_PASSWORD variable is not set. Substituting a blank string. 
(This is an existing compose project)
Project [sockshop]: Starting project 
[10/14] [catalogue]: Starting 
Error response from daemon: Rbd device 604573520ebc276f379c0a2a4c6deca52729865576ab26ba9305fc113f4f3580 does not exist

> hyper compose up -p sockshop -d catalogue
WARN[0000] The MYSQL_ROOT_PASSWORD variable is not set. Substituting a blank string. 
(This is an existing compose project)
Project [sockshop]: Starting project 
[8/14] [catalogue]: Starting 
[8/14] [catalogue]: Started 

Project [sockshop]: Project started 

>
carmark commented 7 years ago

hello @errordeveloper

I will try to fix this after reproducing this with my environment, and I will keep you posted.

Thanks a lot, -Lei

carmark commented 7 years ago

hi @errordeveloper

First of all, I am not sure your quota size which the default container quota size of Hyper.sh is 10. So you have to submit a request for quota increase if your quota size is default one. You can refer this instruct.

Second, you have to set your MYSQL_ROOT_PASSWORD environment to start your mysql container. It works well after setting that environment:

 osboxes@osboxes  ~/hyper-compose-example/errordeveloper  hyper compose up -d
Project [errordeveloper]: Starting project 
[1/14] [payment]: Starting 
[1/14] [payment]: Started 
[2/14] [rabbitmq]: Starting 
[2/14] [rabbitmq]: Started 
[3/14] [user]: Starting 
[3/14] [user]: Started 
[4/14] [user-sim]: Starting 
[4/14] [user-sim]: Started 
[5/14] [orders-db]: Starting 
[5/14] [orders-db]: Started 
[6/14] [front-end]: Starting 
[6/14] [front-end]: Started 
[7/14] [orders]: Starting 
[7/14] [orders]: Started 
[8/14] [catalogue]: Starting 
[8/14] [catalogue]: Started 
[9/14] [edge-router]: Starting 
[9/14] [edge-router]: Started 
[10/14] [shipping]: Starting 
[10/14] [shipping]: Started 
[11/14] [catalogue-db]: Starting 
[11/14] [catalogue-db]: Started 
[12/14] [cart]: Starting 
[12/14] [cart]: Started 
[13/14] [user-db]: Starting 
[13/14] [user-db]: Started 
[14/14] [cart-db]: Starting 
[14/14] [cart-db]: Started 

Project [errordeveloper]: Project started 

image

However, I found that your user-sim container was existed after several minutes. It looks like it can not connect the edge-router container, but I can ping and curl it from user-sim. Also, tried this compose file in docker, same action for container user-sim.

image

BR, -Lei