[cf-lattice] Redis / MySQL / other Docker demo images

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[cf-lattice] Redis / MySQL / other Docker demo images

Juan Pablo Genovese
Guys,

I think I'm doing something wrong.
I have actually dockerized and deployed successfully a Rails app with Lattice, but each time I use a Docker image such as Redis or MySQL I just can't connect to the client.

Is there any other step than the following?

ltc create redis redis -r

When I do

redis-cli -h redis.192.168.11.11.xip.io -p 6379

it just doesn't connect.

telnet won't work either.

Thank you!!

--
Mis mejores deseos,
Best wishes,
Meilleurs vœux,

Juan Pablo
------------------------------------------------------
http://www.jpgenovese.com

_______________________________________________
cf-lattice mailing list
[hidden email]
https://lists.cloudfoundry.org/mailman/listinfo/cf-lattice
Reply | Threaded
Open this post in threaded view
|

Re: [cf-lattice] Redis / MySQL / other Docker demo images

Lev Berman
Hi!

See the "How do I communicate with my containers over TCP?" section here - http://lattice.cf/docs/troubleshooting/.

In short, the Lattice router doesn't support TCP so you need to connect by IP and port. Also, your network should be configured properly for this.

On Wed, May 27, 2015 at 7:02 AM, Juan Pablo Genovese <[hidden email]> wrote:
Guys,

I think I'm doing something wrong.
I have actually dockerized and deployed successfully a Rails app with Lattice, but each time I use a Docker image such as Redis or MySQL I just can't connect to the client.

Is there any other step than the following?

ltc create redis redis -r

When I do

redis-cli -h redis.192.168.11.11.xip.io -p 6379

it just doesn't connect.

telnet won't work either.

Thank you!!

--
Mis mejores deseos,
Best wishes,
Meilleurs vœux,

Juan Pablo
------------------------------------------------------
http://www.jpgenovese.com



--
Lev Berman

Altoros - Cloud Foundry deployment, training and integration


_______________________________________________
cf-lattice mailing list
[hidden email]
https://lists.cloudfoundry.org/mailman/listinfo/cf-lattice
Reply | Threaded
Open this post in threaded view
|

Re: [cf-lattice] Redis / MySQL / other Docker demo images

James Bayer
below is an example starting redis and connecting with the redis-cli to the port specified in "ltc status".

$ ltc create redis redis -r
No port specified, using exposed ports from the image metadata.
Exposed Ports: 6379
No working directory specified, using working directory from the image metadata...
Working directory is:
/data
Monitoring the app on port 6379...
No start command specified, using start command from the image metadata...
Start command is:
/entrypoint.sh redis-server
Creating App: redis
......................................................27 May 12:26 [APP|0] Successfully created container
27 May 12:26 [APP|0] 4:C 27 May 19:26:09.262 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
27 May 12:26 [APP|0] 4:M 27 May 19:26:09.262 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
27 May 12:26 [APP|0] 4:M 27 May 19:26:09.262 # Redis can't set maximum open files to 10032 because of OS error: Operation not permitted.
27 May 12:26 [APP|0] 4:M 27 May 19:26:09.262 # Current maximum open files is 1024. maxclients has been reduced to 992 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
27 May 12:26 [APP|0]                 _._
27 May 12:26 [APP|0]            _.-``__ ''-._
27 May 12:26 [APP|0]       _.-``    `.  `_.  ''-._           Redis 3.0.1 (00000000/0) 64 bit
27 May 12:26 [APP|0]   .-`` .-```.  ```\/    _.,_ ''-._
27 May 12:26 [APP|0]  (    '      ,       .-`  | `,    )     Running in standalone mode
27 May 12:26 [APP|0]  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
27 May 12:26 [APP|0]  |    `-._   `._    /     _.-'    |     PID: 4
27 May 12:26 [APP|0]   `-._    `-._  `-./  _.-'    _.-'
27 May 12:26 [APP|0]  |`-._`-._    `-.__.-'    _.-'_.-'|
27 May 12:26 [APP|0]  |    `-._`-._        _.-'_.-'    |           http://redis.io
27 May 12:26 [APP|0]   `-._    `-._`-.__.-'_.-'    _.-'
27 May 12:26 [APP|0]  |`-._`-._    `-.__.-'    _.-'_.-'|
27 May 12:26 [APP|0]  |    `-._`-._        _.-'_.-'    |
27 May 12:26 [APP|0]   `-._    `-._`-.__.-'_.-'    _.-'
27 May 12:26 [APP|0]       `-._    `-.__.-'    _.-'
27 May 12:26 [APP|0]           `-._        _.-'
27 May 12:26 [APP|0]               `-.__.-'
27 May 12:26 [APP|0] 4:M 27 May 19:26:09.265 # Server started, Redis version 3.0.1
27 May 12:26 [APP|0] 4:M 27 May 19:26:09.265 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
27 May 12:26 [APP|0] 4:M 27 May 19:26:09.265 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
27 May 12:26 [APP|0] 4:M 27 May 19:26:09.265 * The server is now ready to accept connections on port 6379
27 May 12:26 [HEALTH|0] healthcheck passed
27 May 12:26 [HEALTH|0] Exit status 0

redis is now running.
App is reachable at:

pintail:lattice jamesbayer$ ltc status redis
==========================================================================================
      redis
------------------------------------------------------------------------------------------
Instances 1/1
Start Timeout 0
DiskMB 1024
MemoryMB 128
CPUWeight 100
Ports 6379
------------------------------------------------------------------------------------------
Environment

PROCESS_GUID="redis"
PORT="6379"

==========================================================================================
      Instance 0  [RUNNING]
------------------------------------------------------------------------------------------
InstanceGuid 2e005c9b-531f-4afc-73cc-1882f19a6915
Cell ID cell-01
Ip 192.168.11.11
Port Mapping 61001:6379
Uptime 4m53s
Crash Count 0
CPU 0.17%
Memory 6.3M
------------------------------------------------------------------------------------------

$ redis-cli -h 192.168.11.11 -p 61001
OK
"1"


On Wed, May 27, 2015 at 12:12 AM, Lev Berman <[hidden email]> wrote:
Hi!

See the "How do I communicate with my containers over TCP?" section here - http://lattice.cf/docs/troubleshooting/.

In short, the Lattice router doesn't support TCP so you need to connect by IP and port. Also, your network should be configured properly for this.

On Wed, May 27, 2015 at 7:02 AM, Juan Pablo Genovese <[hidden email]> wrote:
Guys,

I think I'm doing something wrong.
I have actually dockerized and deployed successfully a Rails app with Lattice, but each time I use a Docker image such as Redis or MySQL I just can't connect to the client.

Is there any other step than the following?

ltc create redis redis -r

When I do

redis-cli -h redis.192.168.11.11.xip.io -p 6379

it just doesn't connect.

telnet won't work either.

Thank you!!

--
Mis mejores deseos,
Best wishes,
Meilleurs vœux,

Juan Pablo
------------------------------------------------------
http://www.jpgenovese.com



--
Lev Berman

Altoros - Cloud Foundry deployment, training and integration


_______________________________________________
cf-lattice mailing list
[hidden email]
https://lists.cloudfoundry.org/mailman/listinfo/cf-lattice




--
Thank you,

James Bayer

_______________________________________________
cf-lattice mailing list
[hidden email]
https://lists.cloudfoundry.org/mailman/listinfo/cf-lattice
Reply | Threaded
Open this post in threaded view
|

Re: [cf-lattice] Redis / MySQL / other Docker demo images

Juan Pablo Genovese
Fantastic, guys, thank you.

It was funny to actually being able to dockerize and deploy an app with Lattice and Terraform and not begin able to connect to a simple Redis service. Actually, it wasn't funny, it was unnerving.

Thanks, guys!

2015-05-27 16:34 GMT-03:00 James Bayer <[hidden email]>:
below is an example starting redis and connecting with the redis-cli to the port specified in "ltc status".

$ ltc create redis redis -r
No port specified, using exposed ports from the image metadata.
Exposed Ports: 6379
No working directory specified, using working directory from the image metadata...
Working directory is:
/data
Monitoring the app on port 6379...
No start command specified, using start command from the image metadata...
Start command is:
/entrypoint.sh redis-server
Creating App: redis
......................................................27 May 12:26 [APP|0] Successfully created container
27 May 12:26 [APP|0] 4:C 27 May 19:26:09.262 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
27 May 12:26 [APP|0] 4:M 27 May 19:26:09.262 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
27 May 12:26 [APP|0] 4:M 27 May 19:26:09.262 # Redis can't set maximum open files to 10032 because of OS error: Operation not permitted.
27 May 12:26 [APP|0] 4:M 27 May 19:26:09.262 # Current maximum open files is 1024. maxclients has been reduced to 992 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
27 May 12:26 [APP|0]                 _._
27 May 12:26 [APP|0]            _.-``__ ''-._
27 May 12:26 [APP|0]       _.-``    `.  `_.  ''-._           Redis 3.0.1 (00000000/0) 64 bit
27 May 12:26 [APP|0]   .-`` .-```.  ```\/    _.,_ ''-._
27 May 12:26 [APP|0]  (    '      ,       .-`  | `,    )     Running in standalone mode
27 May 12:26 [APP|0]  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
27 May 12:26 [APP|0]  |    `-._   `._    /     _.-'    |     PID: 4
27 May 12:26 [APP|0]   `-._    `-._  `-./  _.-'    _.-'
27 May 12:26 [APP|0]  |`-._`-._    `-.__.-'    _.-'_.-'|
27 May 12:26 [APP|0]  |    `-._`-._        _.-'_.-'    |           http://redis.io
27 May 12:26 [APP|0]   `-._    `-._`-.__.-'_.-'    _.-'
27 May 12:26 [APP|0]  |`-._`-._    `-.__.-'    _.-'_.-'|
27 May 12:26 [APP|0]  |    `-._`-._        _.-'_.-'    |
27 May 12:26 [APP|0]   `-._    `-._`-.__.-'_.-'    _.-'
27 May 12:26 [APP|0]       `-._    `-.__.-'    _.-'
27 May 12:26 [APP|0]           `-._        _.-'
27 May 12:26 [APP|0]               `-.__.-'
27 May 12:26 [APP|0] 4:M 27 May 19:26:09.265 # Server started, Redis version 3.0.1
27 May 12:26 [APP|0] 4:M 27 May 19:26:09.265 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
27 May 12:26 [APP|0] 4:M 27 May 19:26:09.265 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
27 May 12:26 [APP|0] 4:M 27 May 19:26:09.265 * The server is now ready to accept connections on port 6379
27 May 12:26 [HEALTH|0] healthcheck passed
27 May 12:26 [HEALTH|0] Exit status 0

redis is now running.
App is reachable at:

pintail:lattice jamesbayer$ ltc status redis
==========================================================================================
      redis
------------------------------------------------------------------------------------------
Instances 1/1
Start Timeout 0
DiskMB 1024
MemoryMB 128
CPUWeight 100
Ports 6379
------------------------------------------------------------------------------------------
Environment

PROCESS_GUID="redis"
PORT="6379"

==========================================================================================
      Instance 0  [RUNNING]
------------------------------------------------------------------------------------------
InstanceGuid 2e005c9b-531f-4afc-73cc-1882f19a6915
Cell ID cell-01
Ip 192.168.11.11
Port Mapping 61001:6379
Uptime 4m53s
Crash Count 0
CPU 0.17%
Memory 6.3M
------------------------------------------------------------------------------------------

$ redis-cli -h 192.168.11.11 -p 61001
OK
"1"


On Wed, May 27, 2015 at 12:12 AM, Lev Berman <[hidden email]> wrote:
Hi!

See the "How do I communicate with my containers over TCP?" section here - http://lattice.cf/docs/troubleshooting/.

In short, the Lattice router doesn't support TCP so you need to connect by IP and port. Also, your network should be configured properly for this.

On Wed, May 27, 2015 at 7:02 AM, Juan Pablo Genovese <[hidden email]> wrote:
Guys,

I think I'm doing something wrong.
I have actually dockerized and deployed successfully a Rails app with Lattice, but each time I use a Docker image such as Redis or MySQL I just can't connect to the client.

Is there any other step than the following?

ltc create redis redis -r

When I do

redis-cli -h redis.192.168.11.11.xip.io -p 6379

it just doesn't connect.

telnet won't work either.

Thank you!!

--
Mis mejores deseos,
Best wishes,
Meilleurs vœux,

Juan Pablo
------------------------------------------------------
http://www.jpgenovese.com



--
Lev Berman

Altoros - Cloud Foundry deployment, training and integration


_______________________________________________
cf-lattice mailing list
[hidden email]
https://lists.cloudfoundry.org/mailman/listinfo/cf-lattice




--
Thank you,

James Bayer



--
Mis mejores deseos,
Best wishes,
Meilleurs vœux,

Juan Pablo
------------------------------------------------------
http://www.jpgenovese.com

_______________________________________________
cf-lattice mailing list
[hidden email]
https://lists.cloudfoundry.org/mailman/listinfo/cf-lattice