Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev and prod environments #13

Closed
shalunov opened this issue May 15, 2017 · 5 comments
Closed

dev and prod environments #13

shalunov opened this issue May 15, 2017 · 5 comments
Assignees

Comments

@shalunov
Copy link
Contributor

Separate environments so the keys can be different in dev and in prod. Prod keys obviously should not be in the repo.

@shalunov
Copy link
Contributor Author

Before writing any code, let's first discuss the proposed architecture. It's possible that this is a no-code ticket where we specify the private key file from the command-line in production or something to that effect.

@inetic
Copy link
Contributor

inetic commented May 23, 2017

I like the command line idea. If the command line argument isn't used, then hardcoded debug keys are be used and the user is notified on the std output.

@shalunov
Copy link
Contributor Author

That's not the entire architecture. The client needs to know which public key to use. Also, we need to decide how to differentiate between production and development injectors and proxies if they're in the same swarm.

Feel free to propose something, or assign to me to specify.

@inetic
Copy link
Contributor

inetic commented Jun 12, 2017

Also, we need to decide how to differentiate between production and development injectors and proxies if they're in the same swarm.

I'd go with the approach that we don't mix production and development injectors in one swarm (same for proxies). That is, instead of injectors registering in DHT(SHA1("injectors")) they would register in DHT(SHA1("injectors" ++ seed)) where seed is specified on the command line (e.g. with -s) and by default it's just an empty string.

This has an advantage that concurrent tests won't interfere with each other.

When testing, the seed can be generated at random like this.

@inetic
Copy link
Contributor

inetic commented Jun 14, 2017

I have implemented what I described in my previous comment in this commit (as part of PR #59).

@shalunov, let me know if you want me to continue with setting up public and private keys using command line before @ghazel merges his ghazel branch (seems like it might introduce conflicts).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants