I can't deploy my apps

143 views
Skip to first unread message

George Moura

unread,
Dec 30, 2014, 7:29:14 PM12/30/14
to tsuru...@googlegroups.com
Hi Guys,

I need deploy my app, but when run git push tsuru master this mensagem is show:

Counting objects: 6, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (6/6), 826 bytes | 0 bytes/s, done.
Total 6 (delta 0), reused 0 (delta 0)
remote: No nodes available
To g...@tsuru.local:hellogo.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'g...@tsuru.local:hellogo.git'

I try update platform, I try  tsuru-admin docker-node-add --register address=http://tsuru.local:4243, but the same message continue.

My node list:

vagrant@vagrant-ubuntu-trusty-64:/home$ tsuru-admin docker-node-list
+-------------------------+---------+----------+-------------------------------+
| Address                 | IaaS ID | Status   | Metadata                      |
+-------------------------+---------+----------+-------------------------------+
| http://tsuru.local:4243 |         | disabled | DisabledUntil=2014-12-31T00:↵ |
|                         |         |          | 17:42Z                        |
|                         |         |          | Failures=1                    |
|                         |         |          | LastError=Error trying to pu↵ |
|                         |         |          | ll image in node "http://tsu↵ |
|                         |         |          | ru.local:4243": error in doc↵ |
|                         |         |          | ker node http://tsuru.local:↵ |
|                         |         |          | 4243: HTTP code: 404          |
+-------------------------+---------+----------+-------------------------------+

My app-info

$ tsuru app-info
Application: hellogo
Repository: git@localhost:hellogo.git
Platform: go
Teams: deployers
Address: hellogo.tsuru.local
Team owner: deployers
Deploys: 0




Thanks

George Moura

unread,
Jan 1, 2015, 7:55:47 AM1/1/15
to tsuru...@googlegroups.com
Problem Resolved, I needed add a docker registry. But now I have a new problem when run git push tsuru master: 

remote: requests.exceptions.ConnectionError: HTTPConnectionPool(host='tsuru.local', port=8080): Max retries exceeded with url: /apps/hellogo/units/register (Caused by <class 'socket.gaierror'>: [Errno -2] Name or service not known)

Andrews Medina

unread,
Jan 2, 2015, 8:28:53 AM1/2/15
to George Moura, tsuru...@googlegroups.com
Hi George,

Happy new year!

Can you share your tsuru.conf. I believe that `host` key is not
configured properly.

Sorry for the delay.

Best regards,
> --
> You received this message because you are subscribed to the Google Groups
> "tsuru" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to tsuru-users...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Andrews Medina
www.andrewsmedina.com

George Moura

unread,
Jan 2, 2015, 9:55:23 PM1/2/15
to tsuru...@googlegroups.com, andrew...@gmail.com
Hi Andrews,

I installed other server using tsuru-now and I finaly can use tsuru and deploy my test apps. Now I want use tsuru-now in production editing some vars. What you think?

Returning the problem.

My tsuru.conf

listen: "0.0.0.0:8080"
debug: true
#admin-listen: "0.0.0.0:8081"


# Uncomment the following lines to enable HTTPS on Tsuru. You will need the
# paths to the certificate and key files.
#
# use-tls: true
# tls-cert-file: /path/to/cert.pem
# tls-key-file: /path/to/key.pem

# Database configuration. Tsuru API needs a MongoDB server. By default, it will
# connect on localhost, in the default port, and use the database "tsuru".
# Uncomment and customize the lines below to change these values.
#
database:
  name: tsuru

# Git configuration. These settings refer to Gandalf, the git management tool
# used by Tsuru.
#
#   * unit-repo: it's the path where Tsuru will clone app code in units. This
#                value should not change after its initial definition.
#   * api-server: HTTP URL where Gandalf is accessible. Tsuru will use this URL
#                 to create users and repositories.
#   * rw-host: rw-host is the host string that will be used for reading and
#              writing in Git repositories. It will be used to build the SSH
#              URL for the git repository, and need to be accessible from the
#              internet.
#   * ro-host: ro-host is the host string that will be used for reading data
#              from Git repositories. It will be used to build the read-only
#              URL for the repository. This host need to be accessible from
#              units. You may use the private IP of the Gandalf host.
git:
  unit-repo: /home/application/current
#  unit-repo: /home/git
  rw-host: tsuru.local
  ro-host: tsuru.local

# S3 Bucket support. When this flag is defined as true, Tsuru will create a S3
# bucket per application. Bucket creation depends on AWS settings (next
# section).
#
# bucket-support: false

# AWS configuration. Tsuru communicates with AWS to manage user credentials on
# IAM, load balancers on ELB and buckets on S3.
#
# Uncomment these settings if you want to create S3 buckets and manage ELB
# instances per app.
#
# aws:
#   access-key-id: access-id-here
#   secret-access-key: secret-very-secret
#   ec2:
#   iam:
#     endpoint: https://iam.amazonaws.com/
#   s3:
#     region-name: us-west-1
#     bucketEndpoint: https://s3-us-west-1.amazonaws.com
#     location-constraint: true
#     lowercase-bucket: true

# Authentication configuration.
#
#    * token-expire-days: this option controls the time (in days) for a token
#                         to expire.
#    * hash-cost: Tsuru uses bcrypt for password hashing, here you can control
#                 the cost of the hashing.
#    * user-registration: by default, users are not able to register themselves
#                         in Tsuru server (via the "user-create" command).
#                         Changing this options to true enables the user-create
#                         command.

auth:
#   token-expire-days: 7
#   hash-cost: 10
  user-registration: true
  scheme: native

# Tsuru uses provisioners for creating units per app. There are two
# provisioners: Docker and Juju. In order to use the Juju provisioner, you need
# to uncomment the lines below and specify the settings you need.
#
# Juju configuration includes the following options:
#
#    * charms-path: the path to the local charms distribution. Tsuru's charms
#                   are hosted at github.com/globocom/charms.
#    * units-collection: the name of the database collection that Juju
#                        provisioner will use to store information about its
#                        units.
#    * use-elb: when defined as true, Juju provisioner will create ELB
#               instances when provisioning a new app.
#    * elb-endpoint: HTTP endpoint to the Elastic Load Balancing API.
#    * elb-collection: the name of the database collection the Juju provision
#                      will use to store information about ELB instances.
#    * elb-avail-zones: list of availability zones for the load balancer. This
#                       option is not necessary in VPC mode.
#    * elb-use-vpc: defines whether ELB instances should use VPC or ordinary
#                   EC2 networking. When in VPC mode, all load balancers will
#                   be created in internal mode. For more details, check AWS
#                   docs: https://aws.amazon.com/elasticloadbalancing.
#    * elb-vpc-subnets: list of subnets to use in VPC mode.
#    * elb-vpc-secgroups: list of security groups to use in VPC mode.
#
# provisioner: juju
# juju:
#   bootstrap-collection: juju_bootstrap
#   charms-path: /home/charms
#   units-collection: juju_units
#   use-elb: false
#   elb-collection: juju_load_balancers
#   elb-avail-zones:
#     - us-west-1a
#   elb-use-vpc: false
#   elb-vpc-subnets:
#     - network1
#     - network2
#   elb-vpc-secgroups:
#     - secgroup1
#     - secgroup2

# Below are settings for the Docker provisioner. Tsuru uses Docker in a
# clustered environment, so there are some settings related to the scheduling
# of containers in the cluster.
#
#    * servers: list of docker servers. Used in non-segregated mode (see
#               segregate for more details).
#    * collection: name of the database collection that Docker provisioner will
#                  use to store information about containers in the cluster.
#    * repository-namespace: the namespace to use in Docker images. For
#                            instance, an app named blog will have an image
#                            <namespace>/blog.
#    * router: the router to use.
#    * deploy-cmd: command to run every time user runs deploy. When using
#                  Tsuru's default images, just uncomment the line.
#    * segregate: indicates whether tsuru should use a scheduler that
#                  segregates containers among Docker nodes. When using this
#                  scheduler, each team will have a group of Docker nodes and
#                  Tsuru will spawn new containers for that team only on these
#                  nodes. This scheduler can be used to segregate subnets per
#                  team.
#    * scheduler: configuration for the scheduler. In order to make the
#                  cluster run faster, it's recommended to use the Redis
#                  storage. It will store the relation between containers and
#                  nodes.
#    * run-cmd: command that will start the application. Also includes the port
#               that will be used for redirecting traffic. This is the port
#               that applications should bind.
#    * ssh: Tsuru will start the container with a SSH server. This section
#               contains options that describe which command will be used to
#               add the public key to containers, the public key path, the user
#               and the path to the SSH server (which is optional).
provisioner: docker
# hipache:
#   domain: cloud.company.com
docker:
#  registry: tsuru.local:4243
  registry: tsuru.local:3030
# servers:
  collection: docker_containers
  repository-namespace: tsuru
  router: hipache
  deploy-cmd: /var/lib/tsuru/deploy
  segregate: false
#  scheduler:
#    redis-server: tsuru.local:6379
#    redis-prefix: docker-cluster
#    redis-password: s3cr3t
  cluster:
    storage: mongodb
    mongo-url: 127.0.0.1:27017
    mongo-database: cluster  
  run-cmd:
    bin: /var/lib/tsuru/start
    port: "8888"
  ssh:
    add-key-cmd: /var/lib/tsuru/add-key
    public-key: /home/ubuntu/.ssh/id_rsa.pub
    user: ubuntu
    sshd-path: /usr/sbin/sshd

# The address of the queue server (beanstalkd). By default, it's
# 127.0.0.1:11300. Uncomment and change for connecting in a different
# Beanstalkd instance.
#
# queue-server: "127.0.0.1:11300"

queue: redis
redis-queue:
  host: tsuru.local
  port: 6379

# The name of the admin team. When ommited, no team will be able to administrate Tsuru.
admin-team: admin

# Quota information. Tsuru supports two kind of quotas: number of units per app
# and number of apps per user.
#
# quota:
#   units-per-app: 2
#   apps-per-user: 2

hipache:
  domain: tsuru.local
  redis-server: tsuru.local:6379

Andrews Medina

unread,
Jan 7, 2015, 8:27:57 AM1/7/15
to George Moura, tsuru...@googlegroups.com
Hi George,

How I said before, the `host` key is not configured properly. You
should use a public name or IP in the `host` key, because the
containers try to access tsuru api using the address defined in the
`host` key.

Best regards,
--
Andrews Medina
www.andrewsmedina.com

George Moura

unread,
Jan 7, 2015, 9:11:07 AM1/7/15
to Andrews Medina, tsuru...@googlegroups.com
Thanks Andrews,

I will edit and try, but I configured the files /etc/hosts of my notebook and vm pointing  the tsuru.local domain to ip of my vm.
On my notebook: tsuru.local    ip.of.vm
On my vm: tsuru.local   127.0.0.1

More one thing, I can use tsuru-now in production?

Best regards
Reply all
Reply to author
Forward
0 new messages