Closed antho1404 closed 5 years ago
Do we have some details about how we want to do this? Adding service tars for release is easy, but how to pass url - we need to setup some server or pass file location via config, any other propositions?
What I was thinking is one of the two following solutions
LDFLAGS="-X 'github.com/mesg-foundation/core/config.Ethwallet=$walletURL'"
This would be the best but requires a more work.
LDFLAGS="-X 'github.com/mesg-foundation/core/config.Ethwallet=mesg://marketplace/service/xxx
mesg
protocol (for now only the CLI does that and that should be done by the core anyway)I would definitely go with the second option like that we use the marketplace and that's great. This can be done in 2 different dev: "support of mesg protocol in the core" and "publish service from the CI". If it's too complicated we can fallback on the s3 solution.
If we have marketplace let's use it! But in that case we need working marketplace first.
I would go with the marketplace solution as well. EDIT how can the core deploy the marketplace service without using the marketplace service?? The marketplace service is used to resolve the service's data on ethereum (manifest source) and download the manifest using ipfs (actually just http). So how can the core do all of this work without the service that is actually doing it?? This is a chicken and egg problem again.
Solution: We could still deploy the service on the marketplace, but inject the http ipfs gateway url that contains directly the source of the service.
But why deploying from the CI right now? We can, for now, deploy services manually and inject the service URL to the CI using env variables. There is an UI in circleci to manage env variables.
- We set no offer on the marketplace (service free and accessible for anyone)
The marketplace currently requires an offer to be created for the isAuthorize
function to work:
@NicolasMahe
how can the core deploy the marketplace service without using the marketplace service??
We could run it in dev first to publish the service and then inject the result in the actual build for production.
marketplace=$(./dev-cli marketplace publish systemservice/marketplace)
wallet=$(./dev-cli marketplace publish systemservice/ethwallet)
scripts/build-cli.sh --marketplace $marketplace --wallet $wallet
Basically something similar to this but that will be quite heavy...
Another solution would be to install the previous version of mesg-core
and install it the same way with
mesg-core service deploy systemservice/marketplace
mesg-core service start marketplace
mesg-core service execute marketplace --task deployService --json generatedFile.json
We don't use the CLI here but the system service should handle most of the processing, we would still need to upload the sources on ipfs manually and in that case maybe just the upload and inject the tarball as build parameter but the service will not be on the marketplace.
We can, for now, deploy services manually
That's a bit ugly, what happen if we want to work on 2 different versions for the marketplace or some stuff like that, it's also really risky
@krhubert
If we have marketplace let's use it! But in that case we need working marketplace first.
As far as i know and I tested the marketplace works well
As far as i know and I tested the marketplace works well
Yes but do we have a version ready to set up on dev environment (local eth network etc...) to test this easily?
To test you can just use the one deployed already on ropsten, just use the system service that is already configured for that. If you want your own marketplace then you can redeploy the smart contract and update the mesg.yml of the systemservice/marketplace
- MARKETPLACE_ADDRESS=0x94F4cB92Fe9f547574Aec617B1594B13aBd47Ad3
But just use the one already here, everything is set up and everything works. We will anyway clean up the marketplace when we launch
For now we can do a simple workflow:
UploadSource
in marketplace_provider.go
@krhubert can you implement this feature now please:
Todo: Create new script that should be run in the CI:
systemservices
folder, create tar (same as script dev-core).
We have system services now and we need to make sure that these services are installed when the core is installed.
For that we have configurable variables in the configs https://github.com/mesg-foundation/core/blob/e5383ab92c854c5716fe690d6a1a442bf27c59b6/config/services.go#L10-L13
We still need on the CI to upload these services and inject the url of the tarball during the compilation of the core.
The best thing would be to actually use the Marketplace commands to manage this deployment like that we download the service directly from the marketplace and we can test the marketplace