#rancher

/

      • RancherBot
        <senica> does anyone have a good article for setting up agents on same host as server (host is a Mac). Setting up dev environment. I can't use 127.0.0.1, localhost, docker ip doesn't seem to work (I think it's a mac networking thing)
      • <senica> I thought about using Docker in Docker, which seems to startup, but doesn't continue registration.
      • <longwuyuan> @senica how much ram cpu u have and how much u need to run dev
      • <senica> ? it's a macbook pro. I don't think it's a memory or cpu issue. It's a networking issue with docker and mac. I'm just not sure how to resolve that.
      • <senica> for example: if I try and use the rancher server container's ip address like this ``` INFO: Running Agent Registration Process, CATTLE_URL=http://172.23.0.2:8080/v1 INFO: Attempting to connect to: http://172.23.0.2:8080/v1 ERROR: http://172.23.0.2:8080/v1 is not accessible (Connection timed out after 15000 milliseconds) ```
      • <longwuyuan> i know and it is documented problem. i use it everyday. the only possible way is to have virtualbox vm with rancher-server and then use the add host command to add that same vm in infrastructure
      • <longwuyuan> but if ur mbpro can't spare enough vcpu and ram for that virtualbox then tough luck
      • <senica> Got it. By chance, I was going to use my laptops ip address. `ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'`
      • <senica> and then saw that my bridge had a 172 address. I used that and it worked!
      • <longwuyuan> docker for mac is using xhyve or some such macos native virtualization which is a play on packet filter and forward wich works for containers and compose file son macos but not for rancher-host adding
      • <senica> I remember reading something like that. The host added fine. I'll have to see what happens when I start adding services.
      • <jack.cowey> hey
      • <longwuyuan> service also will work with 172.... ... i could not simulate a lb host and a cluster of app running hosts
      • <jack.cowey> im trying to apply multiple cron schedules to a container how can i do this with container-crontab
      • <jack.cowey> i only have `cron.schedule` to play with :)
      • <longwuyuan> so lb .. external service .. app-service all in one
      • Nukien joined the channel
      • <longwuyuan> can't use rancheros too
      • <vincent> Docker for Mac is not supported will not really work. Once you hack around registering, CNI drivers (ipsec and vxlan) map ports by manipulating iptables rules on the host. Which has no relation to the hackery they do to make ports appear to be open on your mac's localhost. Use a regular VM (xhyve, virtualbox, vmware, parallels), or you can do minikube for 2.0-preview2+ eventually
      • <vincent> I use https://github.com/rancher/10acre-ranch#docker-... for xhyve with 1.x
      • Elsmorian has quit
      • Elsmoria_ joined the channel
      • <rubenavazquez> I'm trying to get SSL working with rancher. If my cert isn't part of Ubuntu CA bundle do I *have* to use the self-signed cert method? I'm using a thawte signed cert
      • Vapez has quit
      • Cuzner has quit
      • Elsmoria_ has quit
      • Nukien has quit
      • knutix has quit
      • umbSublime has quit
      • vincent99 has quit
      • jacobwg has quit
      • mcmarto[m] has quit
      • philips has quit
      • stormerider has quit
      • Nicofuma has quit
      • slowest_ has quit
      • jdoelger has quit
      • RancherBot has quit
      • gahan has quit
      • divine has quit
      • ejat has quit
      • eclipse has quit
      • plp has quit
      • betawaffle joined the channel
      • MatrixTraveler[m joined the channel
      • binary106 joined the channel
      • romracer joined the channel
      • _ChauffeR joined the channel
      • yopp has quit
      • yopp joined the channel
      • <longwuyuan> @rubenavazquez one way is to put the cert in a reverseproxy in front to rancher. haproxy/apache/nginx are documented on rancher.com. and then do plain http from the reverseproxy to rancher 8080
      • <longwuyuan> docs have websocket config example working
      • ericvs joined the channel
      • <rubenavazquez> @longwuyuan I have no idea what you just said. I've been staring at the docs for a while now trying to figure this out. I want to experiment first with haproxy, seems the most straight forward
      • <rubenavazquez> @longwuyuan To get a reverse proxy setup with haproxy, do I need to first start rancher with an external db? if so, does that need to be in a container running on rancher?
      • mosulica joined the channel
      • <longwuyuan> @rubenavazquez first install rancher like this http://rancher.com/docs/rancher/v1.6/en/install... if you can not buy a RDS or external MySQL SaaS then choose to bind mount the mysql volume
      • <longwuyuan> No SSL
      • <longwuyuan> use port 8080:8080
      • <longwuyuan> and then do this with HAProxy http://rancher.com/docs/rancher/v1.6/en/install...
      • <longwuyuan> for the ssl paramter of bind in haproxy ... point it to your certificate in pem style... (combine cert, chain & privkey in one file)
      • <longwuyuan> then connect with your browser and accept the cert to join to your cert store
      • <rubenavazquez> can I run a mysql database in another container?
      • <longwuyuan> yes .. and link from the rancher-server . i don't like that myself because containers are ephemeral and i want to keep the data on my disk if i don;t have rds and not repeat the runtime of mysql which is already there inside the rancher/server:stable image
      • <rubenavazquez> I read the logs for running rancher. It has an internal mysql db right?
      • <rubenavazquez> should I not use that mysql db?
      • <longwuyuan> that is what i suggested too. mounting the data dir means the runtime is inside the rancher/server container ... but tit stores the mysql data to the bind mounted volume from my os
      • <rubenavazquez> :S
      • <longwuyuan> mysql inside and mysql-data-dir outside
      • <rubenavazquez> I understand what all the args are doing besides the <host_vol>
      • <longwuyuan> create a directory "mkdir /home/rv/rancher/rancher_mysql_data"
      • <longwuyuan> then -v will be /home/rv/rancher/rancher_mysql_data:/var/lib/mysql
      • <longwuyuan> if you have never used volumes in docker then you should read that first at docs.docker.com
      • <rubenavazquez> ok. I'll give it a go
      • <longwuyuan> have you used NFS before
      • <rubenavazquez> no
      • <longwuyuan> ok .. you can clear this by reading about docker volume on docs.docker.com
      • <istiyaksiddiquee> hello Rancher, I have deployed Kubernetes on digital ocean using Rancher. but my ingress ip seems to remain down unless someone is monitoring rancher master node from browser.is there any solution to this ?
      • <rubenavazquez> @longwuyuan After I set the volume.... where do I save the haproxy config file? Do I do that inside rancher web ui or in a specific place on my ec2 instance?
      • <longwuyuan> have you installed haproxy before
      • <longwuyuan> or nginx
      • <rubenavazquez> neither
      • <rubenavazquez> but to install it would be a quick tutorial right?
      • <rubenavazquez> I was guessing I would have to install haproxy inside the rancher web ui?
      • <rubenavazquez> is that wrong? does haproxy need to run in the ec2 instance outside of docker environment?
      • <longwuyuan> install on host os
      • <longwuyuan> better that way
      • <rubenavazquez> ok
      • <longwuyuan> apt-get -y install haproxy
      • <rubenavazquez> then store the config file per haproxy settings
      • <longwuyuan> then overwrite /etc/haproxy/haproxy.cfg
      • <longwuyuan> yes
      • ledil joined the channel
      • ledil
        hello, is it possible to integrate a working kubernetes environment in rancher ?
      • or should I create a new kubernetes environment in rancher ?
      • RancherBot
        <rubenavazquez> haproxy installed
      • <rubenavazquez> confirmed default config file
      • <marouaneb.xper> Hello every one, i'm using rancher server and i want to add the elasticsearch container The problem is when i want to access to see the result by taping ip_@:9200 and i have no thing
      • <diego> Okay got it, as it is untested is better to avoid it for production environment. Thank you very much for the explanation. I don’t know if other people are also looking for this kind of information but maybe adding this to a FAQ page or somewhere into documentation could be useful.
      • <vincent> The elasticsearch container probably listens on 9200/9300 and has nothing running on 80
      • <rubenavazquez> @longwuyuan for the haproxyconfig file, Do I need to put my chained ssl cert file where it's specified in the config?
      • Command sent from Slack by longwuyuan:
      • ... ... frontend https-in mode http bind *:10023 ssl crt /etc/haproxy/yourcompany_cert.pem default_backend rancher_servers ... ...
      • <marouaneb.xper> @vincent so i put the public host port 9200 and the private container port 9300
      • <marouaneb.xper> I don't find where i can add the loadbalancer type , that i can connect using the navigator ip_@:9200
      • <vincent> The container port has to match the port(s) that the software is actually running and listening on inside the container. 9200 is the http port, 9300 is for something else (I'm not really familiar with ES). The host port can be whatever you want. Unless you have a reason to change it, 9200->9200 and 9300->9300
      • <vincent> Load balancing is a different unrelated problem (and you can't balance to a standalone container like you're making...)
      • <marouaneb.xper> yes i understand you , and i put it like that
      • <marouaneb.xper> and now is running thank you
      • jri joined the channel
      • Elsmoria_ has quit
      • ledil has quit
      • Elsmorian joined the channel
      • Elsmorian has quit
      • cygnusd joined the channel
      • Elsmorian joined the channel
      • <istiyaksiddiquee> hello guys, i am having an ip down issue on rancher ingress. anybody ?
      • Elsmorian has quit
      • <marouaneb.xper> @vincent why when i want to add a volulme /home/config:/usr/share/elasticsearch/config i got this error ?
      • ericvs has quit
      • <istiyaksiddiquee> hello guys ? my rancher ingress ip seems to remain down when rancher control panel is not monitored via web browser.
      • <superseb> You are overriding the config directory which contains necessary files, like log4j2.properties but they are not present in your provided directory
      • <superseb> What does this mean exactly? What are you trying to do and what is failing?
      • <istiyaksiddiquee> i have deployed a spring boot application on a digital ocean kubernetes cluster which is monitored by rancher. whenever i am not monitoring rancher master node, which is monitoring my kubernetes cluster, ingress ip that has been allocated for my app becomes down. i cannot access that ip. but then moment i reopen rancher master node on a tab that ip is back online.
      • jri joined the channel
      • Elsmorian joined the channel
      • cygnusd has quit
      • Elsmorian has quit
      • knutix has quit
      • knutix joined the channel
      • Elsmorian joined the channel
      • <komal.nawandar> hi guys,
      • predmijat_ has quit
      • Pierre-O joined the channel
      • predmijat joined the channel
      • jri joined the channel
      • aze joined the channel
      • jri joined the channel
      • stresler joined the channel
      • Elsmorian has quit