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

Allows Debian Jessie users to play with rippled #1935

Closed
wants to merge 15 commits into from

Conversation

mffrench
Copy link

As a lucky Debian Jessie users, some of us are missing an important stack to play with rippled from the sources : gcc5. Instead of hacking our working station (and potentially break it) we can setup a rippled development environment thanks docker.

Basic idea: being able to edit rippled source files with our favorite tools and then build, test and run rippled inside docker containers.

Let me know if you see any things to be improved in order to accept this pull req.

Cheers,

Mathilde

@codecov-io
Copy link

codecov-io commented Dec 16, 2016

Current coverage is 65.45% (diff: 100%)

Merging #1935 into develop will decrease coverage by <.01%

@@            develop      #1935   diff @@
==========================================
  Files           698        698          
  Lines         49745      49745          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits          32562      32559     -3   
- Misses        17183      17186     +3   
  Partials          0          0          

Powered by Codecov. Last update 4d7b1a3...309c36e

Copy link
Contributor

@nbougalis nbougalis left a comment

Choose a reason for hiding this comment

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

Thank you for this work Mathilde. It needs a little bit of polishing before it's merged, but this is amazing.

I've left some comments that I'd like to see addressed before we proceed. I'll likely add some more small comments over the weekend.

@@ -0,0 +1,157 @@
# DockerPlay : what is this ?

As a lucky Debian Jessie users some of us are missing an impotant stack to play with rippled from the sources : gcc5. Instead of hacking our working station (and potentially break it) we can setup a rippled development environment thanks docker.
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be great if this could be reworded to be a little more formal. Perhaps:

Setup a working rippled development and testing environment inside a Docker container, without the need to install tools and libraries (such as gcc5) on Debian Jessie.

I'm not very familiar with Docker, and I'm curious, will this particular Docker build work only on Debian Jessie hosts? How easy would it be for this container to run, say, on other Linux distributions, such as Ubuntu, Fedora, CentOS or RHEL hosts?

Copy link
Author

Choose a reason for hiding this comment

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

I just described my particular use case as I think most Linux distros are using gcc5 now. But you're right : this should work on any system where docker is installed - any Linux distro but also OSX or Windows (still need to be tested and validated). Will proceed changes as you suggest.


* Build a docker image called rippled-builder as defined in DOCKER_PLAY_ROOT/RippledBuilder/Dockerfile.

**Also notice a rippled user is created to fit your host user uid/gid (Debian users generally have (uid,gid)=(1000,1000) but you're free to change the Dockerfile to fit your environment).**
Copy link
Contributor

Choose a reason for hiding this comment

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

This same comment appears multiple times in this document.


Basic idea: being able to edit rippled source files with our favorite tools and then build, test and run rippled inside docker containers.

# What do you need to play ?
Copy link
Contributor

Choose a reason for hiding this comment

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

Prefer "What do you need to use this container?" instead of "What do you need to play ?" Similarly, below, in the "How to play ?" prefer "How to use" instead.

VOLUME /RIPPLED/data
WORKDIR /RIPPLED

EXPOSE 51235/udp
Copy link
Contributor

Choose a reason for hiding this comment

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

rippled uses tcp; is there a reason why this is udp?

Copy link
Author

Choose a reason for hiding this comment

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

Here I reused same EXPOSE definitions as in Builds/Docker/Dockerfile-testnet without checking doc in deep. I will remove this UDP expose but I'm curious now : why is there this udp expose in the Dockerfile-testnet ?

@wilsonianb
Copy link
Contributor

@mffrench I've been in the habit of making a static build of rippled in a Docker container and running rippled locally (not in Docker).

Dockerfile:
https://gist.github.com/wilsonianb/57c67bc059d74455de13f9689050d6b1

I mount my local source files when I run the container, and a statically linked binary is outputted to build/rippled.

Would something like that work for you?

@mffrench
Copy link
Author

@wilsonianb: originally I wanted to setup and play with a multi rippled nodes network thanks docker-compose and so I didn't get the idea to make a static build.
This solution will work for sure for standalone rippled and unit tests. In the other hand it seems to me docker could be helpful if we want simulate a multi rippled network on the same host.
Let me know what you think about...

@wilsonianb
Copy link
Contributor

wilsonianb commented Dec 19, 2016

@mffrench Are you wanting multi-node networks based on custom builds of rippled? If not, you could simply use the official rpm package in a CentOS Docker base image:
https://ripple.com/build/rippled-setup/#installation-on-centosred-hat-with-yum
There is also a nightly package available built from the rippled develop branch (use ripple-nightly instead of ripple-stable when running yum install).
Note that the rpm install docs instruct you to run rippled with systemd (systemctl), but you may run into issues trying to use systemd in a Docker container:
moby/moby#7459

@mffrench
Copy link
Author

@wilsonianb yep ! I wanted to learn and play with rippled from source to multi nodes network on my debian :) I was thinking that could be also useful for the community and so I did this pull request but if you prefer I can push these tools in a separate git repository to keep this one safe from not so useful code. Let me know what you prefer ;)

@mffrench
Copy link
Author

@nbougalis : I did some changes on the README and RippledRunner/Dockerfile following your advices. Let me know if you see any other improvements to be done.

@mffrench
Copy link
Author

@wilsonianb I added scons options to enable static build depending needs (also documented on readme). Let me know if you have other advices and use cases !

@nbougalis
Copy link
Contributor

nbougalis commented Jan 27, 2017

Thanks for addressing my comments @mffrench. Now that we got 0.50.0 out the door, we will be putting a 0.60.0-b1 together, and we will take a closer look as we consider which PRs will be included.

@vinniefalco
Copy link
Contributor

This needs to be squashed

@nbougalis
Copy link
Contributor

Sorry we didn't get to this earlier and allowed it to bit-rot, @mffrench. I'm going to close it, since, as is, it's just not applicable.

However, I'd be very interested in seeing a revived version, whether docker or vagrant based, based off the latest develop. If you're interested in doing that, that'd be awesome.

@nbougalis nbougalis closed this Oct 6, 2018
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.

None yet

5 participants