Revisions
-
DenisIzmaylov revised this gist
Jun 6, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -279,6 +279,7 @@ ssh core@<host1> 'bash -s' < custom-firewall.sh sudo systemctl start etcd2 sudo systemctl status etcd2 sudo journalctl -xe sudo journalctl -xep3 sudo journalctl -ru etcd2 ``` -
DenisIzmaylov revised this gist
Jun 4, 2016 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -327,6 +327,8 @@ sudo update_engine_client -update sudo reboot ``` See more details [here.](https://coreos.com/os/docs/latest/update-strategies.html) ## Install Deis v1 Attention! It seems that doesn't work correctly with Online.net and other bare metal setups because `ceph` which is using for v1 works unstable and unpredictable. But if you would like to make an experiment, let's go: -
DenisIzmaylov revised this gist
Apr 6, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -396,9 +396,9 @@ Attention! It seems that doesn't work correctly with Online.net and other bare m + [Gist: Running a High Availability Service on CoreOS using Docker, Fleet, Flannel, Etcd, Confd & Nginx](https://gist.github.com/learncodeacademy/2a11bd906c87cf2301a1) + [Docker Fleet Starter](https://github.com/sedouard/fleet-bootstrapper)<sup>[github repo]</sup> + [Do Not Use Public Discovery Service For Runtime Reconfiguration](https://github.com/coreos/etcd/blob/master/Documentation/runtime-reconf-design.md#do-not-use-public-discovery-service-for-runtime-reconfiguration)<sup>[tips]</sup> ## Appendix 2 - Tools and Services + [docker-nginx-https-redirect](https://github.com/coreos/docker-nginx-https-redirect) + [Monitor CoreOS at scale with DataDog](https://www.datadoghq.com/blog/monitor-coreos-scale-datadog/) + [CoreGI - WebUI for monitoring CoreOS clusters including fleet and etcd](https://github.com/yodlr/CoreGI) -
DenisIzmaylov revised this gist
Apr 6, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -396,6 +396,7 @@ Attention! It seems that doesn't work correctly with Online.net and other bare m + [Gist: Running a High Availability Service on CoreOS using Docker, Fleet, Flannel, Etcd, Confd & Nginx](https://gist.github.com/learncodeacademy/2a11bd906c87cf2301a1) + [Docker Fleet Starter](https://github.com/sedouard/fleet-bootstrapper)<sup>[github repo]</sup> + [Do Not Use Public Discovery Service For Runtime Reconfiguration](https://github.com/coreos/etcd/blob/master/Documentation/runtime-reconf-design.md#do-not-use-public-discovery-service-for-runtime-reconfiguration)<sup>[tips]</sup> + [docker-nginx-https-redirect](https://github.com/coreos/docker-nginx-https-redirect) ## Appendix 2 - Tools and Services -
DenisIzmaylov revised this gist
Apr 5, 2016 . 1 changed file with 8 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,6 +13,7 @@ This guide describes how to bootstrap new Production Core OS Cluster as High Ava + [Configure Firewall Rules](#configure-firewall-rules) + [Load Balancers and Service Discovery](#load-balancers-and-service-discovery) + [Troubleshooting](#troubleshooting) + [Update CoreOS](#update-coreos) + [Usage with Deis v1](#usage-with-deis-v1) + [Appendix 1 - Info and Tutorials](#appendix-1---info-and-tutorials) + [Appendix 2 - Tools and Services](#appendix-2---tools-and-services) @@ -319,6 +320,13 @@ ssh core@<host1> 'bash -s' < custom-firewall.sh ssh -A <your-host> ``` ## Update CoreOS ``` sudo update_engine_client -update sudo reboot ``` ## Install Deis v1 Attention! It seems that doesn't work correctly with Online.net and other bare metal setups because `ceph` which is using for v1 works unstable and unpredictable. But if you would like to make an experiment, let's go: -
DenisIzmaylov revised this gist
Mar 10, 2016 . 3 changed files with 22 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,18 @@ [Unit] Description=Announce Someapp%i # Requirements BindsTo=someapp@%i.service Requires=etcd2.service Requires=docker.service # Dependency ordering After=someapp@%i.service After=etcd2.service After=docker.service [Service] ExecStart=/bin/sh -c "while true; do etcdctl set /services/someapp/upstream/someapp%i \"$(sleep 5 && docker inspect -f '{{.NetworkSettings.IPAddress}}' someapp%i):3000\" --ttl 60;sleep 45;done" ExecStop=/usr/bin/etcdctl rm /services/someapp/upstream/someapp%i [X-Fleet] This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,14 @@ [Unit] Description=someapp-lb%i # Requirements Requires=docker.service Requires=etcd2.service # Dependency ordering After=docker.service After=etcd2.service [Service] # Let the process take awhile to start up (for first run Docker containers) TimeoutStartSec=0 @@ -16,12 +20,11 @@ KillMode=none # Get CoreOS environmental variables EnvironmentFile=/etc/environment # Directives with "=-" are allowed to fail without consequence ExecStartPre=-/usr/bin/docker kill someapp-lb%i ExecStartPre=-/usr/bin/docker rm someapp-lb%i ExecStartPre=/usr/bin/docker pull denisizmaylov/nginx-lb ExecStart=/usr/bin/sh -c "/usr/bin/docker run --name someapp-lb%i --rm -p 80:80 -e SERVICE_NAME=someapp -e ETCD=\"$(ifconfig docker0 | awk '/\\<inet\\>/ { print $2 }'):2379\" denisizmaylov/nginx-lb" ExecStop=/usr/bin/docker stop someapp-lb%i [X-Fleet] This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,15 @@ [Unit] Description=someapp%i Requires=docker.service After=docker.service [Service] # Let the process take awhile to start up (for first run Docker containers) TimeoutStartSec=0 # Directives with "=-" are allowed to fail without consequence ExecStartPre=-/usr/bin/docker kill someapp%i ExecStartPre=-/usr/bin/docker rm someapp%i ExecStartPre=/usr/bin/docker pull denisizmaylov/node-sample ExecStart=/usr/bin/docker run -e APPNAME=someapp%i --name someapp%i -P denisizmaylov/node-sample ExecStop=/usr/bin/docker stop someapp%i -
DenisIzmaylov revised this gist
Mar 10, 2016 . 1 changed file with 13 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,9 +2,22 @@ Description=someapp-lb%i After=docker.service Requires=docker.service After=etcd2.service Requires=etcd2.service [Service] # Let the process take awhile to start up (for first run Docker containers) TimeoutStartSec=0 # Change killmode from "control-group" to "none" to let Docker remove # work correctly. KillMode=none # Get CoreOS environmental variables EnvironmentFile=/etc/environment # Pre-start and Start # Directives with "=-" are allowed to fail without consequence ExecStartPre=-/usr/bin/docker kill someapp-lb%i ExecStartPre=-/usr/bin/docker rm someapp-lb%i ExecStartPre=/usr/bin/docker pull denisizmaylov/nginx-lb -
DenisIzmaylov revised this gist
Mar 10, 2016 . No changes.There are no files selected for viewing
-
DenisIzmaylov revised this gist
Mar 10, 2016 . 1 changed file with 50 additions and 47 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,6 +12,7 @@ This guide describes how to bootstrap new Production Core OS Cluster as High Ava + [Create Fleet Units](#create-fleet-units) + [Configure Firewall Rules](#configure-firewall-rules) + [Load Balancers and Service Discovery](#load-balancers-and-service-discovery) + [Troubleshooting](#troubleshooting) + [Usage with Deis v1](#usage-with-deis-v1) + [Appendix 1 - Info and Tutorials](#appendix-1---info-and-tutorials) + [Appendix 2 - Tools and Services](#appendix-2---tools-and-services) @@ -165,16 +166,6 @@ See: [7 reasons why you should be using CoreOS with Docker](https://www.airpair. Sometimes it takes a time. Don't panic. Just wait for a few minutes. 9. Repeat those steps for each server in your cluster. 10. Check your cluster health and fleet status: @@ -239,8 +230,56 @@ See: [Launching Containers with fleet](https://coreos.com/fleet/docs/latest/laun test-app@2.service a78a3229.../10.1.9.18 active running test-app@3.service 081c8a1e.../10.1.9.19 active running ``` ### Configure Firewall Rules Run [custom-firewall.sh](https://raw.githubusercontent.com/deis/deis/master/contrib/util/custom-firewall.sh) from Deis v1 on your local machine: ```bash curl -O https://raw.githubusercontent.com/deis/deis/master/contrib/util/custom-firewall.sh # run follow line for each server ssh core@<host1> 'bash -s' < custom-firewall.sh ``` ### Load Balancers and Service Discovery 1. Download [someapp@.service](#file-someapp-service), [someapp-discovery@.service](#file-someapp-discovery-service) and [someapp-lb@.service](#file-someapp-lb-service). 2. Modify those Unit Templates according to your application config. 3. Submit modificated files to your Fleet: ```bash fleetctl submit someapp@.service fleetctl submit someapp-discovery@.service fleetctl submit someapp-lb@.service ``` 4. Start Unit instances from templates: ```bash fleetctl start someapp@{1..6} fleetctl start someapp-discovery@{1..6} fleetctl start someapp-lb@{1..2} ``` 5. Verify all is working good: ```bash fleetctl list-units ``` ## Troubleshooting + **Something goes wrong and a service doesn't work** Use those commands to debug: ```bash # also for fleet, etcd, flanneld sudo systemctl start etcd2 sudo systemctl status etcd2 sudo journalctl -xe sudo journalctl -ru etcd2 ``` + **`fleet list-units` is displaying `failed` state for any units** @@ -279,42 +318,6 @@ See: [Launching Containers with fleet](https://coreos.com/fleet/docs/latest/laun ssh-add ~/.ssh/id_rsa ssh -A <your-host> ``` ## Install Deis v1 -
DenisIzmaylov revised this gist
Mar 10, 2016 . 1 changed file with 13 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -54,14 +54,16 @@ See: [7 reasons why you should be using CoreOS with Docker](https://www.airpair. ```bash coreos: etcd2: # Generate a new token for each unique cluster from https://discovery.etcd.io/new # discovery: https://discovery.etcd.io/<token> discovery: https://discovery.etcd.io/9c19239271bcd6be78d4e8acfb393551 # Multi-region and multi-cloud deployments need to use $public_ipv4 advertise-client-urls: http://$private_ipv4:2379,http://$private_ipv4:4001 initial-advertise-peer-urls: http://$private_ipv4:2380 # Listen on both the official ports and the legacy ports # Legacy ports can be omitted if your application doesn't depend on them listen-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001 listen-peer-urls: http://$private_ipv4:2380 @@ -85,7 +87,12 @@ See: [7 reasons why you should be using CoreOS with Docker](https://www.airpair. - name: fleet.service command: start # Network configuration should be here, e.g: # - name: 00-eno1.network # content: "[Match]\nName=eno1\n\n[Network]\nDHCP=yes\n\n[DHCP]\nUseMTU=9000\n" # - name: 00-eno2.network # runtime: true # content: "[Match]\nName=eno2\n\n[Network]\nDHCP=yes\n\n[DHCP]\nUseMTU=9000\n" - name: flanneld.service command: start @@ -107,7 +114,6 @@ See: [7 reasons why you should be using CoreOS with Docker](https://www.airpair. [Service] Restart=always - name: docker-tcp.socket command: start enable: true @@ -127,7 +133,7 @@ See: [7 reasons why you should be using CoreOS with Docker](https://www.airpair. ```bash units: # ... - name: 00-eno2.network runtime: true content: "[Match]\nName=eno2\n\n[Network]\nDHCP=yes\n\n[DHCP]\nUseMTU=9000\n" -
DenisIzmaylov revised this gist
Mar 10, 2016 . 1 changed file with 8 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,6 +6,7 @@ This guide describes how to bootstrap new Production Core OS Cluster as High Ava # Content + [Introduction](#introduction) + [Tools Used](#tools-used) + [Basic Configuration](#basic-configuration) + [Connect Your Servers as a Cluster](#connect-your-servers-as-a-cluster) + [Create Fleet Units](#create-fleet-units) @@ -18,13 +19,19 @@ This guide describes how to bootstrap new Production Core OS Cluster as High Ava ## Introduction CoreOS is a powerful Linux distribution built to make large, scalable deployments on varied infrastructure simple to manage. CoreOS is designed for security, consistency, and reliability. Instead of installing packages via yum or apt, CoreOS uses Linux containers to manage your services at a higher level of abstraction. A single service's code and all dependencies are packaged within a container that can be run on one or many CoreOS machines. Main building blocks of CoreOS — etcd, Docker and systemd. See: [7 reasons why you should be using CoreOS with Docker](https://www.airpair.com/coreos/posts/coreos-with-docker). ### Tools Used + etcd: key-value store for service registration and discovery + fleet: scheduling and failover of Docker containers across CoreOS Cluster + flannel: gives each docker container a unique IP that allows you to access the internal port (i.e. port 80 not 32679) + confd: watch etcd for nodes arriving/leaving and update (with reload) nginx configuration by using specified template ## Basic Configuration ### Connect your servers as a cluster -
DenisIzmaylov revised this gist
Mar 10, 2016 . 1 changed file with 43 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -62,6 +62,9 @@ See: [7 reasons why you should be using CoreOS with Docker](https://www.airpair. public-ip: $private_ipv4 metadata: region=europe,public_ip=$public_ipv4 flannel: interface: $private_ipv4 units: - name: etcd2.service command: start @@ -71,23 +74,56 @@ See: [7 reasons why you should be using CoreOS with Docker](https://www.airpair. content: | [Service] TimeoutStartSec=0 - name: fleet.service command: start # network configuration should be here - name: flanneld.service command: start drop-ins: - name: 50-network-config.conf content: | [Service] ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{ "Network": "10.1.0.0/16" }' - name: docker.service command: start drop-ins: - name: 60-docker-wait-for-flannel-config.conf content: | [Unit] After=flanneld.service Requires=flanneld.service [Service] Restart=always - name: docker-tcp.socket command: start enable: true content: | [Unit] Description=Docker Socket for the API [Socket] ListenStream=2375 Service=docker.service BindIPv6Only=both [Install] WantedBy=sockets.target ``` 5. Online.net provide has a specific configuration preset. It requires you to process additional step - add those lines to Cloud Config to get Private Network working: ```bash units: # ... - name: 00-eno2.network runtime: true content: "[Match]\nName=eno2\n\n[Network]\nDHCP=yes\n\n[DHCP]\nUseMTU=9000\n" ``` 6. Validate your changes: -
DenisIzmaylov revised this gist
Mar 9, 2016 . No changes.There are no files selected for viewing
-
DenisIzmaylov revised this gist
Mar 9, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -119,7 +119,7 @@ See: [7 reasons why you should be using CoreOS with Docker](https://www.airpair. If something goes wrong use follow commands to debug: ```bash # use for etcd2, fleet, etcd sudo systemctl start etcd2 sudo systemctl status etcd2 sudo journalctl -xe -
DenisIzmaylov revised this gist
Mar 9, 2016 . 2 changed files with 7 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,11 +5,11 @@ Requires=docker.service [Service] TimeoutStartSec=0 ExecStartPre=-/usr/bin/docker kill someapp-lb%i ExecStartPre=-/usr/bin/docker rm someapp-lb%i ExecStartPre=/usr/bin/docker pull denisizmaylov/nginx-lb ExecStart=/usr/bin/sh -c "/usr/bin/docker run --name someapp-lb%i --rm -p 80:80 -e SERVICE_NAME=someapp -e ETCD=\"$(ifconfig docker0 | awk '/\<inet\>/ { print $2}'):2379\" denisizmaylov/nginx-lb" ExecStop=/usr/bin/docker stop someapp-lb%i [X-Fleet] Conflicts=someapp-lb@* This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,6 +7,6 @@ Requires=docker.service TimeoutStartSec=0 ExecStartPre=-/usr/bin/docker kill someapp%i ExecStartPre=-/usr/bin/docker rm someapp%i ExecStartPre=/usr/bin/docker pull denisizmaylov/node-sample ExecStart=/usr/bin/docker run --name someapp%i -e APPNAME=someapp%i denisizmaylov/node-sample ExecStop=/usr/bin/docker kill someapp%i -
DenisIzmaylov revised this gist
Mar 9, 2016 . 1 changed file with 9 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -324,18 +324,18 @@ Attention! It seems that doesn't work correctly with Online.net and other bare m ## Appendix 1 - Info and Tutorials + [Building Microservices with CoreOS & etcd](https://www.youtube.com/watch?v=5BPSnDSDnOc) <sup>[video talk]<sup> + [How To Set Up a CoreOS Cluster on DigitalOcean](https://www.digitalocean.com/community/tutorials/how-to-set-up-a-coreos-cluster-on-digitalocean) + [How To Secure Your CoreOS Cluster with TLS/SSL and Firewall Rules on DigitalOcean](https://www.digitalocean.com/community/tutorials/how-to-secure-your-coreos-cluster-with-tls-ssl-and-firewall-rules) <sup>[article]</sup> + [Automated Nginx Reverse Proxy for Docker](http://jasonwilder.com/blog/2014/03/25/automated-nginx-reverse-proxy-for-docker/)<sup>[article]</sup> + [High Availability Apps via Fleet & CoreOS – Start to Finish: Provisioning on Azure](http://blog.stevenedouard.com/high-availability-apps-via-fleet-coreos-from-start-to-finish-provisioning-coreos-using-azure-resource-manager/)<sup>[article]</sup> + [Tips for Deploying NGINX (Official Image) with Docker](https://blog.docker.com/2015/04/tips-for-deploying-nginx-official-image-with-docker/)<sup>[article]</sup> + [CoreOS Continued: Fleet and Docker](http://blog.scottlowe.org/2014/08/20/coreos-continued-fleet-and-docker/)<sup>[article]</sup> + [Nginx Load Balancer Service For Core OS](https://gist.github.com/mssio/1b949d0952aaf69c2543) + [ServerFault: Nginx proxy to many container running on different CoreOS nodes](http://serverfault.com/questions/678695/nginx-proxy-to-many-container-running-on-different-coreos-nodes) + [Gist: Running a High Availability Service on CoreOS using Docker, Fleet, Flannel, Etcd, Confd & Nginx](https://gist.github.com/learncodeacademy/2a11bd906c87cf2301a1) + [Docker Fleet Starter](https://github.com/sedouard/fleet-bootstrapper)<sup>[github repo]</sup> + [Do Not Use Public Discovery Service For Runtime Reconfiguration](https://github.com/coreos/etcd/blob/master/Documentation/runtime-reconf-design.md#do-not-use-public-discovery-service-for-runtime-reconfiguration)<sup>[tips]</sup> ## Appendix 2 - Tools and Services -
DenisIzmaylov revised this gist
Mar 9, 2016 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -212,12 +212,12 @@ See: [Launching Containers with fleet](https://coreos.com/fleet/docs/latest/laun 1. Check you have connected with `ssh -A`. 2. Check you are not using `sudo` for remote machines. In this case a process under `sudo` can't access to your `SSH_AUTH_SOCK`. + **Error response from daemon: Conflict. The name "someapp1" is already in use by container c4acbb70c654. You have to delete (or rename) that container to be able to reuse that name.** ```bash fleetctl stop someapp@1 docker rm someapp1 fleetctl start someapp@1 ``` + **fleet `ssh` command doesn't working** -
DenisIzmaylov revised this gist
Mar 9, 2016 . 1 changed file with 14 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -195,10 +195,23 @@ See: [Launching Containers with fleet](https://coreos.com/fleet/docs/latest/laun + **`fleet list-units` is displaying `failed` state for any units** For local units: ```bash sudo fleetctl journal someapp@1 ``` For remote units: ```bash fleetctl journal someapp@1 ``` + **`fleetctl` reponds with: Error running remote command: SSH_AUTH_SOCK environment variable is not set. Verify ssh-agent is running. See https://github.com/coreos/fleet/blob/master/Documentation/using-the-client.md for help.** 1. Check you have connected with `ssh -A`. 2. Check you are not using `sudo` for remote machines. In this case a process under `sudo` can't access to your `SSH_AUTH_SOCK`. + **Error response from daemon: Conflict. The name "testapp1" is already in use by container c4acbb70c654. You have to delete (or rename) that container to be able to reuse that name.** ```bash -
DenisIzmaylov revised this gist
Mar 9, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -230,7 +230,7 @@ ssh core@<host1> 'bash -s' < custom-firewall.sh ### Load Balancers and Service Discovery 1. Download [someapp@.service](#file-someapp-service), [someapp-discovery@.service](#file-someapp-discovery-service) and [someapp-lb@.service](#file-someapp-lb-service). 2. Modify those Unit Templates according to your application config. 3. Submit modificated files to your Fleet: -
DenisIzmaylov revised this gist
Mar 9, 2016 . 1 changed file with 10 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -230,22 +230,29 @@ ssh core@<host1> 'bash -s' < custom-firewall.sh ### Load Balancers and Service Discovery 1. Download [someapp@.service](someapp@.service), [someapp-discovery@.service](someapp-discovery@.service) and [someapp-lb@.service](someapp-lb@.service). 2. Modify those Unit Templates according to your application config. 3. Submit modificated files to your Fleet: ```bash fleetctl submit someapp@.service fleetctl submit someapp-discovery@.service fleetctl submit someapp-lb@.service ``` 4. Start Unit instances from templates: ```bash fleetctl start someapp@{1..6} fleetctl start someapp-discovery@{1..6} fleetctl start someapp-lb@{1..2} ``` 5. Verify all is working good: ```bash fleetctl list-units ``` ## Install Deis v1 -
DenisIzmaylov revised this gist
Mar 9, 2016 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -220,7 +220,7 @@ See: [Launching Containers with fleet](https://coreos.com/fleet/docs/latest/laun ### Configure Firewall Rules Run [custom-firewall.sh](https://raw.githubusercontent.com/deis/deis/master/contrib/util/custom-firewall.sh) from Deis v1 on your local machine: ```bash curl -O https://raw.githubusercontent.com/deis/deis/master/contrib/util/custom-firewall.sh @@ -230,7 +230,7 @@ ssh core@<host1> 'bash -s' < custom-firewall.sh ### Load Balancers and Service Discovery 1. Modify attached files according to your application config. 2. Submit that to your Fleet: ```bash @@ -249,7 +249,7 @@ ssh core@<host1> 'bash -s' < custom-firewall.sh ## Install Deis v1 Attention! It seems that doesn't work correctly with Online.net and other bare metal setups because `ceph` which is using for v1 works unstable and unpredictable. But if you would like to make an experiment, let's go: 1. Create backup copy of your original config: -
DenisIzmaylov revised this gist
Mar 6, 2016 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -74,8 +74,7 @@ See: [7 reasons why you should be using CoreOS with Docker](https://www.airpair. - name: fleet.service command: start - name: flanneld.service command: enable drop-ins: - name: 50-network-config.conf content: | -
DenisIzmaylov revised this gist
Mar 6, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ Step By Step Guide to Configure a CoreOS Cluster From Scratch ============================================================= This guide describes how to bootstrap new Production Core OS Cluster as High Availability Service in a 15 minutes with using etcd2, Fleet, Flannel, Confd, Nginx Balancer and Docker. # Content -
DenisIzmaylov revised this gist
Mar 6, 2016 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -232,10 +232,12 @@ ssh core@<host1> 'bash -s' < custom-firewall.sh ### Load Balancers and Service Discovery 1. Modify attached files according to your application. 2. Submit that to your Fleet: ```bash fleetctl submit someapp@.service fleetctl submit someapp-discovery@.service fleetctl submit someapp-lb@.service ``` 3. Start Unit instances from templates: -
DenisIzmaylov revised this gist
Mar 6, 2016 . 1 changed file with 20 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,8 @@ This guide describes how to bootstrap new Core OS Cluster as High Availability S + [Connect Your Servers as a Cluster](#connect-your-servers-as-a-cluster) + [Create Fleet Units](#create-fleet-units) + [Configure Firewall Rules](#configure-firewall-rules) + [Load Balancers and Service Discovery](#load-balancers-and-service-discovery) + [Usage with Deis v1](#usage-with-deis-v1) + [Appendix 1 - Info and Tutorials](#appendix-1---info-and-tutorials) + [Appendix 2 - Tools and Services](#appendix-2---tools-and-services) @@ -228,7 +229,24 @@ curl -O https://raw.githubusercontent.com/deis/deis/master/contrib/util/custom-f ssh core@<host1> 'bash -s' < custom-firewall.sh ``` ### Load Balancers and Service Discovery 1. Modify attached files according to your application. 2. Submit those Unit Templates: ```bash fleetctl submit someapp@.service someapp-discovery@.service someapp-lb@.service ``` 3. Start Unit instances from templates: ```bash fleetctl start someapp@{1..6} fleetctl start someapp-discovery@{1..6} fleetctl start someapp-lb@{1..2} ``` ## Install Deis v1 Attention! It seems that doesn't work correctly with Online.net bare metal setups. -
DenisIzmaylov revised this gist
Mar 6, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ TimeoutStartSec=0 ExecStartPre=-/usr/bin/docker kill someapp-lb ExecStartPre=-/usr/bin/docker rm someapp-lb ExecStartPre=/usr/bin/docker pull willrstern/nginx-lb ExecStart=/usr/bin/sh -c "/usr/bin/docker run --name someapp-lb --rm -p 80:80 -e SERVICE_NAME=someapp -e TEST_HOST=%H -e ETCD=\"$(ifconfig docker0 | awk '/\<inet\>/ { print $2}'):2379\" willrstern/nginx-lb" ExecStop=/usr/bin/docker stop someapp-lb [X-Fleet] -
DenisIzmaylov revised this gist
Mar 6, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ [Unit] Description=someapp-lb%i After=docker.service Requires=docker.service @@ -8,7 +8,7 @@ TimeoutStartSec=0 ExecStartPre=-/usr/bin/docker kill someapp-lb ExecStartPre=-/usr/bin/docker rm someapp-lb ExecStartPre=/usr/bin/docker pull willrstern/nginx-lb ExecStart=/usr/bin/docker run --name someapp-lb%i --rm -p 80:80 -e SERVICE_NAME=someapp -e ETCD="$(ifconfig docker0 | awk '/\<inet\>/ { print $2}'):2379" willrstern/nginx-lb ExecStop=/usr/bin/docker stop someapp-lb [X-Fleet] -
DenisIzmaylov revised this gist
Mar 6, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,5 +8,5 @@ TimeoutStartSec=0 ExecStartPre=-/usr/bin/docker kill someapp%i ExecStartPre=-/usr/bin/docker rm someapp%i ExecStartPre=/usr/bin/docker pull willrstern/node-sample ExecStart=/usr/bin/docker run --name someapp%i -e APPNAME=someapp%i willrstern/node-sample ExecStop=/usr/bin/docker kill someapp%i -
DenisIzmaylov revised this gist
Mar 6, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,8 +4,8 @@ BindsTo=someapp@%i.service After=someapp@%i.service [Service] ExecStart=/bin/sh -c "sleep 10; while true; do etcdctl set /services/someapp/upstream/someapp%i \"$(sleep 5 && docker inspect -f '{{.NetworkSettings.IPAddress}}' someapp%i):3000\" --ttl 60; sleep 45; done" ExecStop=/usr/bin/etcdctl rm /services/someapp/upstream/someapp%i [X-Fleet] MachineOf=someapp@%i.service -
DenisIzmaylov renamed this gist
Mar 6, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ [Unit] Description=someapp-lb%1 After=docker.service Requires=docker.service @@ -12,5 +12,5 @@ ExecStart=/usr/bin/docker run --name someapp-lb --rm -p 80:80 -e SERVICE_NAME=so ExecStop=/usr/bin/docker stop someapp-lb [X-Fleet] Conflicts=someapp-lb@* MachineMetadata=loadbalancer=true
NewerOlder