Page MenuHomePhabricator

[services] Dev Mode - setup local cloud
AbandonedPublic

Authored by karol on Mar 23 2022, 7:57 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 23, 2:18 PM
Unknown Object (File)
Sat, Nov 23, 12:09 PM
Unknown Object (File)
Sat, Nov 23, 10:25 AM
Unknown Object (File)
Fri, Nov 8, 10:40 PM
Unknown Object (File)
Tue, Nov 5, 4:32 PM
Unknown Object (File)
Sat, Nov 2, 1:14 PM
Unknown Object (File)
Oct 27 2024, 2:17 PM
Unknown Object (File)
Oct 16 2024, 6:04 PM

Details

Summary

Depends on D3495

This enables us to launch a local cloud instance for the dev mode and then set it up properly.
By "set up" I mean create the same structure for S3 buckets and dynamo DB tables as there is already on our cloud.

Test Plan
cd services
yarn run-local-cloud
yarn setup-local-cloud

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

services/package.json
26–27

The only problem here is that after running a cloud we have to wait a couple of seconds before it gets all the necessary things ready. This is problematic, because, for now, we have to first run the cloud, then wait a moment, and after that manually set it up. One way to overcome this is to set up a hard timeout, like 5 seconds. This solution does not look good but it's the simplest I can think of.

I'm going to try to find a way to somehow "hook up" to some event when the services are ready on the cloud but I'm not sure whether it is possible.

karol edited the summary of this revision. (Show Details)

fix naming, newline

jim requested changes to this revision.Apr 4 2022, 12:49 PM

This doesn't seem like a good approach, see my comments on D3495. How were these tables and buckets created in the production DB? Were these commands run manually? The same script or migration system should be used in both local and production environments. This approach doesn't permit that because necessarily one database environment has to be set up to create the schema backup which is used to bootstrap the dev environment.

This revision now requires changes to proceed.Apr 4 2022, 12:49 PM

This doesn't seem like a good approach, see my comments on D3495.

Responded.

How were these tables and buckets created in the production DB? Were these commands run manually?

I created them using creators on the AWS web panel.

The same script or migration system should be used in both local and production environments. This approach doesn't permit that because necessarily one database environment has to be set up to create the schema backup which is used to bootstrap the dev environment.

Hmm. Maybe you're right, we should probably use terraform at this point, what do you think?

Yeah, I agree that this would probably be a good time to start setting up Terraform.

I changed my approach, now I used terraform for this. I'm abandoning this one. I decided that it will be faster to set up a new stack as I reordered the diffs and a lot of the differed from the ones from this stack. Let's follow up in the stack beginning at D3695.