forked from toolshed/abra
		
	feat: Add cloud-init file
This commit is contained in:
		
							
								
								
									
										5
									
								
								scripts/cloud-init/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								scripts/cloud-init/README.md
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,5 @@ | ||||
| # cloud-init | ||||
|  | ||||
| This folder contains cloud-init files for installing Abra and its dependencies. | ||||
|  | ||||
| For more information, see <https://cloudinit.readthedocs.io/en/latest/index.html> | ||||
							
								
								
									
										49
									
								
								scripts/cloud-init/cloud-init.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								scripts/cloud-init/cloud-init.yaml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,49 @@ | ||||
| #cloud-config | ||||
|  | ||||
| package_update: true | ||||
| package_upgrade: true | ||||
| package_reboot_if_required: true | ||||
|  | ||||
| # https://packages.debian.org/bookworm/docker.io | ||||
| packages: | ||||
|   - ca-certificates | ||||
|   - curl | ||||
|   - docker.io | ||||
|   - docker-compose | ||||
|   # https://stackoverflow.com/a/74084180 | ||||
|   - apparmor | ||||
|  | ||||
| # https://docs.coopcloud.tech/operators/tutorial/#server-setup | ||||
| runcmd: | ||||
|   - curl -fsSL https://install.abra.coopcloud.tech | env HOME=/root bash | ||||
|   - docker swarm init | ||||
|   - docker network create -d overlay proxy | ||||
|  | ||||
| write_files: | ||||
|   # Add abra to PATH and set EDITOR | ||||
|   - path: /etc/profile.d/custom_path.sh | ||||
|     content: | | ||||
|       export PATH=$PATH:$HOME/.local/bin | ||||
|       export EDITOR=vim | ||||
|     owner: root:root | ||||
|     permissions: '0755' | ||||
|   # Send container log to journald: https://docs.coopcloud.tech/operators/handbook/#how-do-i-persist-container-logs-after-they-go-away | ||||
|   - path: /etc/docker/daemon.json | ||||
|     content: | | ||||
|       { | ||||
|           "log-driver": "journald", | ||||
|           "log-opts": { | ||||
|             "labels":"com.docker.swarm.service.name" | ||||
|           } | ||||
|       } | ||||
|     owner: root:root | ||||
|     permissions: '0644' | ||||
|   # Rotate logs | ||||
|   - path: /etc/systemd/journald.conf | ||||
|     content: | | ||||
|       [Journal] | ||||
|       Storage=persistent | ||||
|       SystemMaxUse=5G | ||||
|       MaxFileSec=1month | ||||
|     owner: root:root | ||||
|     permissions: '0644' | ||||
		Reference in New Issue
	
	Block a user