Merge pull request #17 from redbrick/ingress-node-pool
add ingress node pool
This commit is contained in:
		
						commit
						db1300b355
					
				
					 3 changed files with 15 additions and 5 deletions
				
			
		
							
								
								
									
										11
									
								
								cluster-config/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								cluster-config/README.md
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,11 @@
 | 
				
			||||||
 | 
					# Nomad Cluster Configuration
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					This directory contains configuration relating to the configuration of the cluster including:
 | 
				
			||||||
 | 
					- node pools
 | 
				
			||||||
 | 
					- agent config
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Node Pools
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Node pools](https://developer.hashicorp.com/nomad/docs/concepts/node-pools) are a way to group nodes together into logical groups which jobs can target that can be used to enforce where allocations are placed.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					e.g. [`ingress-pool.hcl`](./ingress-pool.hcl) is a node pool that is used for ingress nodes such as the [bastion-vm](https://docs.redbrick.dcu.ie/aperture/bastion-vm/). Any jobs that are defined to use `node_pool = "ingress"` such as `traefik.hcl` and `gate-proxy.hcl` will only be assigned to one of the nodes in the `ingress` node pool (i.e. the [bastion VM](https://docs.redbrick.dcu.ie/aperture/bastion-vm/))
 | 
				
			||||||
							
								
								
									
										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,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