Skip to content

Commit

Permalink
refactoring:
Browse files Browse the repository at this point in the history
- using yarn workspaces for shared node packages
- combining separate packages within node-packages into one and building it with node8 and no need for babel
- updating all node services to node8 and with that much easier babel config
- removing api-legacy and openshiftdeploy-legacy
  • Loading branch information
Schnitzel committed Jul 23, 2017
1 parent 570baf9 commit 20f67c1
Show file tree
Hide file tree
Showing 157 changed files with 3,078 additions and 35,146 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ deploytest
*.retry
startVagrant.sh
minishift
**/v8-*
**/v8-*
node_modules
1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
workspaces-experimental true
40 changes: 8 additions & 32 deletions docker-compose.ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,6 @@ services:
- OC_BUILD_DEPLOY_IMAGE_LOCATION=absolute
- DOCKER_RUN_PARARM=--network=lagoon_default
- CI_OVERRIDE_IMAGE_REPO=${BUILD_TAG}
openshiftdeploy-legacy:
build:
context: .
dockerfile: services/openshiftdeploy-legacy/Dockerfile
command: yarn run dev
environment:
- OC_BUILD_DEPLOY_IMAGE_LOCATION=absolute
- DOCKER_RUN_PARARM=--network=lagoon_default
- CI_OVERRIDE_IMAGE_REPO=${BUILD_TAG}
logs2slack:
build:
context: .
Expand All @@ -62,16 +53,6 @@ services:
- GIT_BRANCH_PULL=ci-local
volumes:
- .:/lagoon
api-legacy:
build:
context: .
dockerfile: services/api-legacy/Dockerfile
command: yarn run dev
environment:
- GIT_REPOSITORY=file:///lagoon/hiera
- GIT_BRANCH_PULL=ci-local
volumes:
- ./services/api-legacy/src:/app/src
jenkins:
build:
context: .
Expand Down Expand Up @@ -105,19 +86,6 @@ services:
build: local-git-server
environment:
- GIT_AUTHORIZED_KEYS=ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC5b9Awb6iwWRz1z+QDwLlSvtpxg/7pR7Rf+kJT3khQGiLuX4Qk2aDCrt1fKndjyUuj55ocRc8OlExrA8FPfZbpnfaNXfVh9TlybhjIWUHtLbc9giCoDuiV2TEb6ZW/esKlVtWomzfY/njwPAuXEU2i3j5YxVQuZ0y+AN4yca4V1y7y2BlUOvp5qSvz/8PcBJegaoesSSuFpQWCR788/i0sURJiaG6+tZN+bGVSnJgtbXQJvc0r45au3PL5jyMcApbHOCDQUIiWyC6ipW2EIYTUBVO80QVEjymmBZpZEQl/0DQPEzBdqCi4X4wmwhoan7hQJQ7dNdqmRL+W4L75yPNyngNgJVNTlIXOHXevpNskH//HUlwEp4WPHuT76BZT3cq1RCatn6iMsFiwpESk9xyDbEVPfxKAr77cRpFIHuJd7amDjTk7/KP0PTliO2ViCyjDudiajwNh7XmY0ZqYrhHI16ebTSESDslh0a0JlZvWlYa4xDBKtKwfINRrcrYmuYUzSF7wn7F1o45cHZ2kuftioOQhLNgx0LqztRMn3RBoeG3QHbxmv9WfO/0hHa4FdkQLErEdzEM9JR4WewRnh04dcjejX1daWKbo2X8ndaCc0BvdNDL/HpSgqfCnJ2Nlq4pM6Pomkvdp5wTWpZwCjDl08UgttAFrQwjYoBy9UpUmDQ== ansible-testing
elasticsearch:
build: services/elasticsearch
user: '1000'
environment:
- ES_JAVA_OPTS=-Xms200m -Xmx200m
kibana:
build:
context: .
dockerfile: services/kibana/Dockerfile
logstash:
build:
context: .
dockerfile: services/logstash/Dockerfile
hacky-rest2tasks-ui:
build:
context: .
Expand All @@ -126,3 +94,11 @@ services:
environment:
- API=http://api:3000
- REST2TASKS_URL=http://rest2tasks:3000
local-hiera-watcher-pusher:
depends_on:
- git
build: local-hiera-watcher-pusher
environment:
- SSH_PRIVATE_KEY=-----BEGIN RSA PRIVATE KEY-----\nMIIJKQIBAAKCAgEAuW/QMG+osFkc9c/kA8C5Ur7acYP+6Ue0X/pCU95IUBoi7l+E\nJNmgwq7dXyp3Y8lLo+eaHEXPDpRMawPBT32W6Z32jV31YfU5cm4YyFlB7S23PYI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ew1BN+LS\nLzomX1GQIj/95Bi8Hhfivsz1CZ2B+kJ49NcXgtDNLiPthj9i8wmJNLTdaYTU/cxE\nAigy7x/O5/3iLTjxQAyAgdFyDNmhWJBJWkttQGVUWidZtXtnc4p5j5+dcRvZzxJN\nMwLXCRRoL8Ltm8zjYtow0k+cl/OpWCjoACsJxfmuiOH5Ro3h27uLWce33AVOlGEA\n4TJ6ewKCAQAScrryhDDyFeTcAJKWgnGqUszi/EyqQ+rMGqSVHDWWAdljHVx7YAxy\nCj/QDN9weWSxV/J6wCJjrj6RqbX0PgJJlvTpthbx/YmkK80dOG7ytfKkUuePwGqn\nmDdZbDtyoyQELdKyo9At/Tl5HgBBHdRlP8eAuYTIVKdpnIKSpxaH75+xFTz3NSIX\nzieTMHfwtUbo2o5rRvMV0tUhMwqYf6rJtGuJIbSrnGdh1CBwogX4iZTyn7ZvD6Ex\nQiR8DcV3KAYYn43tIJVcGBFOFuVNZn+xfFSjFuwh+/d6FLmp9CoHp6ChWHIuav+M\nSOxQqYew1s/PQyAgDiMQLXB+UoqnKuXVAoIBAQCBRcSjXWseY+/Uvqj+41kKcEFL\nT7AuJcrb9fpN0EYbrTlaU1yVDfYxnRn4Pw2de1XE/S2dngvriraFHrY/fnyRqM5C\ns/1QnzAjb+y/Vvvt/RaDYXwpm8KpSrd3vqwj7TsoYgWiSvmbjYOg6Gt8QJZNmfhS\nYexGNfR/Zr8jdK9ZC6Tqwt2yUuBtVS3wWmX7Dqz3/kAfJ+tNp7CQNGw7TOMXH071\nfU/ZNna8w+9G3mxSRWM+wxIg7pPZ4floXVJGTcYl6+pG8a1saUNRwx72+pt3XUMD\nXYS+IJhFCIXCuehmfDIp7Fe8Ed2s1QDbF/vdc+icTah12SF/XhZ+6clY8j2Y\n-----END RSA PRIVATE KEY-----
volumes:
- ./local-hiera:/home/hiera
56 changes: 14 additions & 42 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ services:
build:
context: .
dockerfile: services/webhook-handler/Dockerfile
command: bash -c "yarn run link-node-packages && yarn run dev"
command: yarn run dev
ports:
- "7777:3000"
volumes:
- ./services/webhook-handler/src:/app/services/webhook-handler/src
- ./node-packages:/app/node-packages
- ./node-packages:/app/node-packages:delegated
rabbitmq:
build:
context: .
Expand All @@ -21,65 +21,54 @@ services:
build:
context: .
dockerfile: services/openshiftremove/Dockerfile
command: bash -c "yarn run link-node-packages && yarn run dev"
command: yarn run dev
volumes:
- ./services/openshiftremove/src:/app/services/openshiftremove/src
- ./node-packages:/app/node-packages
- ./node-packages:/app/node-packages:delegated
openshiftremove-legacy:
build:
context: .
dockerfile: services/openshiftremove-legacy/Dockerfile
command: bash -c "yarn run link-node-packages && yarn run dev"
command: yarn run dev
volumes:
- ./services/openshiftremove-legacy/src:/app/services/openshiftremove/src
- ./node-packages:/app/node-packages
- ./node-packages:/app/node-packages:delegated
openshiftdeploy:
build:
context: .
dockerfile: services/openshiftdeploy/Dockerfile
command: bash -c "yarn run link-node-packages && yarn run dev"
command: yarn run dev
environment:
- OC_BUILD_DEPLOY_IMAGE_LOCATION=absolute
- DOCKER_RUN_PARARM=--network=lagoon_default
- CI_OVERRIDE_IMAGE_REPO=laggon-local-dev
volumes:
- ./services/openshiftdeploy/src:/app/services/openshiftdeploy/src
- ./node-packages:/app/node-packages
openshiftdeploy-legacy:
build:
context: .
dockerfile: services/openshiftdeploy-legacy/Dockerfile
command: bash -c "yarn run link-node-packages && yarn run dev"
environment:
- OC_BUILD_DEPLOY_IMAGE_LOCATION=absolute
- DOCKER_RUN_PARARM=--network=lagoon_default
volumes:
- ./services/openshiftdeploy-legacy/src:/app/services/openshiftdeploy/src
- ./node-packages:/app/node-packages
- ./node-packages:/app/node-packages:delegated
logs2slack:
build:
context: .
dockerfile: services/logs2slack/Dockerfile
command: bash -c "yarn run link-node-packages && yarn run dev"
command: yarn run dev
volumes:
- ./services/logs2slack/src:/app/services/logs2slack/src
- ./node-packages:/app/node-packages
- ./node-packages:/app/node-packages:delegated
webhooks2tasks:
build:
context: .
dockerfile: services/webhooks2tasks/Dockerfile
command: bash -c "yarn run link-node-packages && yarn run dev"
command: yarn run dev
volumes:
- ./services/webhooks2tasks/src:/app/services/webhooks2tasks/src
- ./node-packages:/app/node-packages
- ./node-packages:/app/node-packages:delegated
rest2tasks:
build:
context: .
dockerfile: services/rest2tasks/Dockerfile
command: bash -c "yarn run link-node-packages && yarn run dev"
command: yarn run dev
volumes:
- ./services/rest2tasks/src:/app/services/rest2tasks/src
- ./node-packages:/app/node-packages
- ./node-packages:/app/node-packages:delegated
ports:
- "5555:3000"
api:
Expand All @@ -104,18 +93,6 @@ services:
- auth-server
depends_on:
- auth-server
api-legacy:
build:
context: .
dockerfile: services/api-legacy/Dockerfile
command: yarn run dev
environment:
- GIT_REPOSITORY=http://git:8080/git/hiera.git
volumes:
- ./services/api-legacy/src:/app/src
- .:/lagoon
ports:
- "3001:3000"
auth-ssh:
build: services/auth-ssh
# TODO:
Expand Down Expand Up @@ -199,11 +176,6 @@ services:
- RABBITMQ_PASSWORD=guest
- ELASTICSEARCH_URL=http://elasticsearch:9200
- XPACK_MONITORING_ELASTICSEARCH_URL=http://elasticsearch:9200
node-packages-lerna:
build: node-packages
command: bash -c "lerna bootstrap && lerna run --parallel watch"
volumes:
- .:/app:delegated
remotedev:
image: jhen0409/remotedev-server
command: node main.js
Expand Down
11 changes: 0 additions & 11 deletions lerna.json

This file was deleted.

12 changes: 4 additions & 8 deletions local-hiera/amazeeio/sitegroups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,8 @@ amazeeio_sitegroups:
router_pattern: ${sitegroup}.${branch}.192.168.77.100.nip.io
folder: subfolder
active_systems:
deploy:
lagoon_openshift:
branches: true
remove: lagoon_openshift
deploy: lagoon_openshiftDeploy
remove: lagoon_openshiftRemove
ci-node2:
client: deploytestclient
git_url: 'git@git:/git/node.git'
Expand All @@ -71,7 +69,5 @@ amazeeio_sitegroups:
template: node.yml
router_pattern: ${sitegroup}.${branch}.192.168.77.100.nip.io
active_systems:
deploy:
lagoon_openshift:
branches: true
remove: lagoon_openshift
deploy: lagoon_openshiftDeploy
remove: lagoon_openshiftRemove
1 change: 0 additions & 1 deletion node-packages/.dockerignore

This file was deleted.

2 changes: 0 additions & 2 deletions node-packages/Dockerfile

This file was deleted.

9 changes: 0 additions & 9 deletions node-packages/amazeeio-api/.babelrc

This file was deleted.

1 change: 0 additions & 1 deletion node-packages/amazeeio-api/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion node-packages/amazeeio-api/.npmignore

This file was deleted.

Loading

0 comments on commit 20f67c1

Please sign in to comment.