add ingress node pool
This commit is contained in:
		
							parent
							
								
									6f6692d89a
								
							
						
					
					
						commit
						8d91938ee2
					
				
					 4 changed files with 16 additions and 15 deletions
				
			
		
							
								
								
									
										5
									
								
								cluster-config/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								cluster-config/README.md
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,5 @@
 | 
				
			||||||
 | 
					# Nomad Cluster Configuration
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					This directory contains configuration relating to the configuration of the cluster including:
 | 
				
			||||||
 | 
					- node pools
 | 
				
			||||||
 | 
					- agent config
 | 
				
			||||||
							
								
								
									
										3
									
								
								cluster-config/ingress-pool.hcl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								cluster-config/ingress-pool.hcl
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,3 @@
 | 
				
			||||||
 | 
					node_pool "ingress" {
 | 
				
			||||||
 | 
					  description = "Nodes for ingress to aperture. e.g. bastion-vm"
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -1,14 +1,9 @@
 | 
				
			||||||
job "mc-router" {
 | 
					job "gate-proxy" {
 | 
				
			||||||
  datacenters = ["aperture"]
 | 
					  datacenters = ["aperture"]
 | 
				
			||||||
 | 
					  node_pool = "ingress"
 | 
				
			||||||
  type = "service"
 | 
					  type = "service"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  constraint {
 | 
					  group "gate-proxy" {
 | 
				
			||||||
    attribute = "${attr.unique.hostname}"
 | 
					 | 
				
			||||||
    value = "bastion-vm"
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  group "mc-router" {
 | 
					 | 
				
			||||||
    count = 1
 | 
					    count = 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    network {
 | 
					    network {
 | 
				
			||||||
| 
						 | 
					@ -27,7 +22,7 @@ job "mc-router" {
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    task "webserver" {
 | 
					    task "gate-proxy" {
 | 
				
			||||||
      driver = "docker"
 | 
					      driver = "docker"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      config {
 | 
					      config {
 | 
				
			||||||
| 
						 | 
					@ -47,9 +42,11 @@ job "mc-router" {
 | 
				
			||||||
config:
 | 
					config:
 | 
				
			||||||
  bind: 0.0.0.0:4501
 | 
					  bind: 0.0.0.0:4501
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  forwarding:
 | 
				
			||||||
 | 
					    mode: legacy
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  lite:
 | 
					  lite:
 | 
				
			||||||
    enabled: true
 | 
					    enabled: true
 | 
				
			||||||
 | 
					 | 
				
			||||||
    routes:
 | 
					    routes:
 | 
				
			||||||
      - host: fugitives.rb.dcu.ie
 | 
					      - host: fugitives.rb.dcu.ie
 | 
				
			||||||
        backend: fugitives-mc.service.consul:25566
 | 
					        backend: fugitives-mc.service.consul:25566
 | 
				
			||||||
| 
						 | 
					@ -1,12 +1,8 @@
 | 
				
			||||||
job "traefik" {
 | 
					job "traefik" {
 | 
				
			||||||
  datacenters = ["aperture"]
 | 
					  datacenters = ["aperture"]
 | 
				
			||||||
 | 
					  node_pool = "ingress"
 | 
				
			||||||
  type        = "service"
 | 
					  type        = "service"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  constraint {
 | 
					 | 
				
			||||||
    attribute = "${attr.unique.hostname}"
 | 
					 | 
				
			||||||
    value = "bastion-vm"
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  group "traefik" {
 | 
					  group "traefik" {
 | 
				
			||||||
    network {
 | 
					    network {
 | 
				
			||||||
      port "http"{
 | 
					      port "http"{
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue