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

Packaging #64

Merged
merged 36 commits into from
Mar 22, 2022
Merged

Packaging #64

merged 36 commits into from
Mar 22, 2022

Conversation

jbsv
Copy link
Contributor

@jbsv jbsv commented Mar 15, 2022

The new scripts provided allow to install and start the unikernel service and then the voting node.

@jbsv jbsv requested a review from pierluca March 16, 2022 13:49
@coveralls
Copy link

coveralls commented Mar 17, 2022

Pull Request Test Coverage Report for Build 2005235636

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 18 of 36 (50.0%) changed or added relevant lines in 3 files are covered.
  • 56 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.03%) to 55.021%

Changes Missing Coverage Covered Lines Changed/Added Lines %
contracts/evoting/evoting.go 6 9 66.67%
services/dkg/pedersen/controller/mod.go 8 23 34.78%
Files with Coverage Reduction New Missed Lines %
contracts/evoting/evoting.go 56 74.01%
Totals Coverage Status
Change from base Build 1998466806: -0.03%
Covered Lines: 3090
Relevant Lines: 5616

💛 - Coveralls

jbsv and others added 4 commits March 17, 2022 18:56
- import the mino crontroller to use the public IP instead of 127.0.0.1
- updates the smart contract to use a specified folder. Also makes it configurable via the CLI
- fixes wrong use of the temp folder in the combine share
- fixes wrong commands in the README
- updates uses of 127.0.0.1 to use the default 0.0.0.0 IP
- update the start-dvoting script to use added CLI arguments
- adds instructions on how to operate a node and setup the chain
-
Copy link
Contributor

@pierluca pierluca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can only imagine the amount of work that went into this, good job !
I do feel that there are still a few rough edges worth cleaning up before the first release though.

deb-package/README.md Outdated Show resolved Hide resolved
deb-package/README.md Show resolved Hide resolved
- Create .deb package:

```sh
make deb
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it hard for make deb to automatically make the unikernel and do all of the above? If not, it might be worth it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not feasible yet, because there is a 'make menuconfig' step where we have to modify the config. We could dig into that to have a default config, but it might take quite some time for little value right now.

deb-package/pkg/after-install.sh Outdated Show resolved Hide resolved
deb-package/pkg/before-install.sh Outdated Show resolved Hide resolved
deb-package/pkg/lib/systemd/system/unikernel.service Outdated Show resolved Hide resolved
deb-package/pkg/etc/dedis/dvoting/config.env Outdated Show resolved Hide resolved
Comment on lines 4 to 6
export dela_port="9000"
export prometheus_addr="127.0.0.1:9100"
export proxy_addr="127.0.0.1:9080"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we simply move these 3 lines into network.env ?

deb-package/pkg/etc/dedis/dvoting/config.env Outdated Show resolved Hide resolved
nkcr added 2 commits March 18, 2022 17:16
Adds updates to make the setup run on detached VMs
deb-package/pkg/opt/dedis/dvoting/bin/start-dvoting Outdated Show resolved Hide resolved
err = exportPubshares(tmp, election.PubsharesUnits, numBallots, numChunks)
dela.Logger.Info().Msgf("using the following folder: %s", tmp)

err = exportPubshares(filepath.Join(e.exportFolder, tmp), election.PubsharesUnits, numBallots, numChunks)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filepath.Join(e.exportFolder, tmp) is recomputed multiple times.
Consider using a variable.

contracts/evoting/evoting.go Show resolved Hide resolved
cli/minocontroller/actions.go Show resolved Hide resolved
// start the overlay on the start command, and make sure resources are cleaned
// when the CLI daemon is stopping.
//
// Documentation Last Review: 07.10.2020
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question

README.md Show resolved Hide resolved
deb-package/README.md Show resolved Hide resolved
- Create .deb package:

```sh
make deb
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not feasible yet, because there is a 'make menuconfig' step where we have to modify the config. We could dig into that to have a default config, but it might take quite some time for little value right now.

deb-package/pkg/before-install.sh Outdated Show resolved Hide resolved
deb-package/pkg/lib/systemd/system/unikernel.service Outdated Show resolved Hide resolved
deb-package/pkg/lib/systemd/system/unikernel.service Outdated Show resolved Hide resolved
deb-package/pkg/lib/systemd/system/unikernel.service Outdated Show resolved Hide resolved
deb-package/pkg/lib/systemd/system/unikernel.service Outdated Show resolved Hide resolved
[Service]
User=dvoting

ExecStartPre=/bin/bash -c "rm -f /var/opt/dedis/dvoting/data/dela/daemon.sock"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will be solved later

deb-package/pkg/lib/systemd/system/unikernel.service Outdated Show resolved Hide resolved
deb-package/pkg/opt/dedis/dvoting/bin/start-dvoting Outdated Show resolved Hide resolved
export dela_bin=".../cli/memcoin"
export dela_data=".../tmp/dela"
export dela_bin="../../../../../memcoin"
export dela_data="/tmp/dela"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure about this ?

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 12 Code Smells

18.9% 18.9% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@nkcr nkcr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Go! 🚀

@nkcr nkcr merged commit 286c6dd into unikernel-combine-shares Mar 22, 2022
@nkcr nkcr deleted the packaging branch March 22, 2022 16:42
ineiti added a commit that referenced this pull request Oct 10, 2024
Correctly create new keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants