Migrate services part
This commit is contained in:
		
							parent
							
								
									7c59e4ae57
								
							
						
					
					
						commit
						73bce8f6e5
					
				
					 157 changed files with 3883 additions and 9 deletions
				
			
		
							
								
								
									
										31
									
								
								roles/webdis/files/webdis.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								roles/webdis/files/webdis.json
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,31 @@ | |||
| { | ||||
|     "redis_host":	"redis", | ||||
| 
 | ||||
|     "redis_port":	6379, | ||||
|     "redis_auth":	null, | ||||
| 
 | ||||
|     "http_host":	"0.0.0.0", | ||||
|     "http_port":	7379, | ||||
| 
 | ||||
|     "threads":	5, | ||||
|     "pool_size": 20, | ||||
| 
 | ||||
|     "daemonize":	false, | ||||
|     "websockets":	false, | ||||
| 
 | ||||
|     "database":	0, | ||||
| 
 | ||||
|     "acl": [ | ||||
|         { | ||||
|             "disabled":	["DEBUG"] | ||||
|         }, | ||||
| 
 | ||||
|         { | ||||
|             "http_basic_auth":	"user:password", | ||||
|             "enabled":		["DEBUG"] | ||||
|         } | ||||
|     ], | ||||
| 
 | ||||
|     "verbosity": 4, | ||||
|     "logfile": "/dev/stderr" | ||||
| } | ||||
							
								
								
									
										21
									
								
								roles/webdis/tasks/main.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								roles/webdis/tasks/main.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,21 @@ | |||
| --- | ||||
| - name: Set common facts | ||||
|   ansible.builtin.import_tasks: tasks/set-default-facts.yml | ||||
| 
 | ||||
| - name: Deploy {{ svc.name }} | ||||
|   vars: | ||||
|     svc: "{{ webdis_svc }}" | ||||
|     env: "{{ webdis_env }}" | ||||
|     compose: "{{ webdis_compose }}" | ||||
|   block: | ||||
|     - name: Import prepare tasks for common service | ||||
|       ansible.builtin.import_tasks: tasks/prepare-common-service.yml | ||||
| 
 | ||||
|     - name: Copy the config | ||||
|       ansible.builtin.copy: | ||||
|         src: webdis.json | ||||
|         dest: "{{ (service_path, 'webdis.json') | path_join }}" | ||||
|         mode: "0755" | ||||
| 
 | ||||
|     - name: Import start tasks for common service | ||||
|       ansible.builtin.import_tasks: tasks/start-common-service.yml | ||||
							
								
								
									
										24
									
								
								roles/webdis/vars/main.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								roles/webdis/vars/main.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,24 @@ | |||
| --- | ||||
| webdis_svc: | ||||
|   name: webdis | ||||
|   domain: webdis.huck.serguzim.me | ||||
|   port: 7379 | ||||
| 
 | ||||
| webdis_compose: | ||||
|   watchtower: true | ||||
|   image: nicolas/webdis | ||||
|   volumes: | ||||
|     - ./webdis.json:/config/webdis.json | ||||
|   file: | ||||
|     services: | ||||
|       app: | ||||
|         command: /usr/local/bin/webdis /config/webdis.json | ||||
|         depends_on: | ||||
|           - redis | ||||
|       redis: | ||||
|         image: redis:6.2.6 | ||||
|         restart: always | ||||
|         labels: | ||||
|           com.centurylinklabs.watchtower.enable: true | ||||
|     networks: | ||||
|       default: | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue