Merge branch 'master' into home-deploy

This commit is contained in:
Giles Bradshaw 2020-08-13 15:00:34 +01:00
commit b49ae2ed69
9 changed files with 1665 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
node_modules

3
.versionrc Normal file
View File

@ -0,0 +1,3 @@
{
"tagMessageInChangeLog": true
}

9
CHANGELOG.md Normal file
View File

@ -0,0 +1,9 @@
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [0.0.3](https://sigyl.com///compare/v0.0.1...v0.0.3) "chore(release): 0.0.3" (2020-08-11)
### [0.0.2](https://sigyl.com///compare/v0.0.1...v0.0.2) (2020-08-11)
### 0.0.1 (2020-08-11)

View File

@ -4,3 +4,45 @@
* guacamole-postgres-password * guacamole-postgres-password
* local-docker-registry * local-docker-registry
* registry-password
## initial deployment
initialise database
```shell
docker ps | grep guacamole-postgresql.1
sh init-postgresql.sh $ID
```
## using ssh keys
guacamole does *not* work with the standard openssh format for private keys. ie:
```
-----BEGIN OPENSSH PRIVATE KEY-----
[key goes here]
-----END OPENSSH PRIVATE KEY-----
```
you need to generate the public/private key pair using:
```shell
ssh-keygen -m pem
```
this will give you a private key that looks like:
```
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: [dec info goes here]
[key goes here]
-----END RSA PRIVATE KEY-----
```
then on the target machine you need to paste the *public* key into the file /home/[user]/.ssh/authorized_keys
and the *private* key into the configuration for the guacamole connection

1
build.sh Normal file
View File

@ -0,0 +1 @@
docker build guacamole-postgresql -t ${LOCAL_DOCKER_REGISTRY}guacamole-postgresql

4
deploy.sh Normal file
View File

@ -0,0 +1,4 @@
docker stack rm guacamole
echo 'sleeping...zzz'
sleep 60
docker stack deploy -c docker-compose.yml guacamole

2
init-postgresql.sql Normal file
View File

@ -0,0 +1,2 @@
docker exec -it $1 psql -U postgres -d $GUACAMOLE_POSTGRES_DB -f /initdb.sql
docker exec -it $1 psql -U postgres -d $GUACAMOLE_POSTGRES_DB -f /init-user.sql -v password=$GUACAMOLE_POSTGRES_PASSWORD -v user=$GUACAMOLE_POSTGRES_USER

21
package.json Normal file
View File

@ -0,0 +1,21 @@
{
"private": true,
"name": "guacamole",
"version": "0.0.3",
"description": "remote access",
"scripts": {
"build": "sh build.sh",
"deploy": "sh deploy.sh",
"release": "standard-version",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://sigyl.com/git/stack/guacamole"
},
"author": "Giles Bradshaw",
"license": "ISC",
"devDependencies": {
"standard-version": "git+https://github.com/gilesbradshaw/standard-version.git"
}
}

1581
yarn.lock Normal file

File diff suppressed because it is too large Load Diff