Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Migrate to monorepo setup for Opla project #1

Closed
mikbry opened this issue Jun 4, 2018 · 6 comments
Closed

Migrate to monorepo setup for Opla project #1

mikbry opened this issue Jun 4, 2018 · 6 comments
Assignees
Labels
enhancement New feature or request infra Infrastructure related

Comments

@mikbry
Copy link
Contributor

mikbry commented Jun 4, 2018

@mikbry mikbry added the enhancement New feature or request label Jun 4, 2018
@licarth
Copy link
Contributor

licarth commented Aug 16, 2018

About merging front and backend. (not zoapp for now, no libs)

Benefits

saves precious development time

  • avoid .circleci/config.yaml duplication.
  • make PR / changes easier and easier to test (proper e2e testing)
  • easier management of certificates, and allows wildcard certificates in an easy-ish way.
  • de-duplicates ingress.yaml
  • de-duplicates README.md
  • makes dev onboarding simpler
  • removes the necessity for an infra branch in opla/opla.
  • allows easy preview deployments of Pull Requests (link added by a bot in the comments)

makes the app easier to install for users/admins

  • allows a single point of entry for someone who wants to deploy opla as an application (who wants only the backend or only the front)

Risks

1 commit for 2 releases. Beware of downtime due to api changes. Every change should be retrocompatible with the previous version(s), between backend and front.
--> good news is that we could automate that testing against version n-1 and/or n-2 of the backend or of the frontend if this becomes a problem, since we have a single repo.

How to proceed

Preparation Phase

  • Try it with 2 given commits from front and backend. Fix all the myke.yaml and circleci configs.
  • deploy to a singlerepo namespace.
  • communicate about changes (show the example repo that deploys to a test namespace)
  • Close as many PRs as possible and warn that they will need to be moved.
  • Copy issues from front and back to opla

Real transition (to do at night or over the weekend)

  • Update code from backend and front with an approach that keeps git history (see https://stackoverflow.com/a/10548919)
  • Really deploy to qa, preprod, prod.
  • Redirect users from Opla/front and Opla/backend without removing the code.

@licarth licarth closed this as completed Aug 16, 2018
@licarth licarth reopened this Aug 16, 2018
licarth pushed a commit that referenced this issue Aug 17, 2018
Merge existing code into this repository
licarth pushed a commit that referenced this issue Aug 17, 2018
Backport existing code into this repo
@licarth
Copy link
Contributor

licarth commented Aug 17, 2018

About commit history

The tricky point is not about moving the code into a single repo, but is about moving the code into subfoldlers (front/ and backend/)

  • Commits and SHAs will not get lost and stay the same :
    https://github.com/Opla/backend/commit/d3ea8cb1e159a57823df791dd62323649d5df080
    becomes https://github.com/Opla/opla/commit/d3ea8cb1e159a57823df791dd62323649d5df080.
  • Rollback to a point before the merging of the repos will no longer be possible. (which is an argument for doing it early)
  • Clicking on History will only show history since the repo merge. This is because github executes git log instead of git log --follow. Gitlab does use --follow. (see Support git --follow to preserve history across renames isaacs/github#900)

Short term github workaround : a chrome extension allows to add an easy link to the history before the file got renamed. Try it yourself with backend/package.json
image

Locally just run git log --follow <file> instead of git log <file> to get the complete history. To have it at all times : git config log.follow true

Long term fix : upvote this issue.

@mikbry
Copy link
Contributor Author

mikbry commented Aug 20, 2018

Add docker setup and add in /README how to install it

@licarth
Copy link
Contributor

licarth commented Aug 20, 2018

@mikbry Docker like docker-compose (what's in community edition) or docker kubernetes ?

@mikbry
Copy link
Contributor Author

mikbry commented Aug 20, 2018

docker-compose as in community-edition

@licarth
Copy link
Contributor

licarth commented Aug 21, 2018

This is done in #18.

@licarth licarth closed this as completed Aug 21, 2018
@licarth licarth assigned licarth and unassigned lodelestra Aug 21, 2018
@licarth licarth added the infra Infrastructure related label Aug 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request infra Infrastructure related
Projects
None yet
Development

No branches or pull requests

3 participants