-
Notifications
You must be signed in to change notification settings - Fork 337
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
Renaming binary + docker #223
Conversation
@@ -106,8 +106,8 @@ pub mod opaque { | |||
|
|||
/// This runtime version. | |||
pub const VERSION: RuntimeVersion = RuntimeVersion { | |||
spec_name: create_runtime_str!("moonbase-alphanet"), | |||
impl_name: create_runtime_str!("moonbase-alphanet"), | |||
spec_name: create_runtime_str!("moonbeam"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JoshOrndorff
Will that impact the network (preventing to upgrade or ...) ? I'm not sure if the spec_name and impl_name are actually involved or just for description)..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. I don't know. I think we should make this change either way though. Then test it out. If it rules out runtime upgrades, maybe we just purge again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a big fan of changing the binary name to moonbeam
and cleaning the dockerfile. I left a little feedback below.
My biggest question is why we have two dockerfiles now.
For reference, here is Polkadot's dockerfile https://github.com/paritytech/polkadot/blob/master/docker/Dockerfile
- name: Prepare | ||
id: prep | ||
run: | | ||
DOCKER_IMAGE=purestake/moonbase-parachain-testnet | ||
DOCKER_IMAGE=purestake/moonbase-parachain |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DOCKER_IMAGE=purestake/moonbase-parachain | |
DOCKER_IMAGE=purestake/moonbeam |
Kind of makes sense for the image name to match the binary name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the internal docker image. The public one is the next build step
@@ -4,24 +4,24 @@ | |||
|
|||
FROM phusion/baseimage:0.11 | |||
LABEL maintainer "[email protected]" | |||
LABEL description="this is the parachain node running Moonbase Alphanet" | |||
LABEL description="this is the parachain node running Moonbase" | |||
ARG PROFILE=release | |||
|
|||
RUN mv /usr/share/ca* /tmp && \ | |||
rm -rf /usr/share/* && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just start with a slimmer base image?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you suggest ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked and it adds 20MB overhead to the binary. (total 140MB)
Not sure we can do a lot better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've heard people having success with Alpine. https://hub.docker.com/_/alpine/ It claims to be only 5MB.
I'm not really saying that our image is too big as it is. I just hadn't seen anyone manually removing stuff that comes in the base image before.
useradd -m -u 1000 -U -s /bin/sh -d /moonbase-parachain moonbeam && \ | ||
mkdir -p /moonbase-parachain/.local/share/moonbase-parachain && \ | ||
chown -R moonbeam:moonbeam /moonbase-parachain && \ | ||
ln -s /moonbase-parachain/.local/share/moonbase-parachain /data && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the directory still called moonbase-parachain
? Why not just call it moonbeam
or data
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This docker image is for ops, I kept it as close as our current process
@@ -0,0 +1,32 @@ | |||
# Node for Moonbase Alphanet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there a second dockerfile now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the public docker image file.
The other one (the previous one) is for internal use only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I need to change the desc here
@@ -106,8 +106,8 @@ pub mod opaque { | |||
|
|||
/// This runtime version. | |||
pub const VERSION: RuntimeVersion = RuntimeVersion { | |||
spec_name: create_runtime_str!("moonbase-alphanet"), | |||
impl_name: create_runtime_str!("moonbase-alphanet"), | |||
spec_name: create_runtime_str!("moonbeam"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. I don't know. I think we should make this change either way though. Then test it out. If it rules out runtime upgrades, maybe we just purge again?
@purestakeoskar and @Mitchell-Grimes |
@albertov19 this PR will change how the documentation should reference moonbeam through docker.
With this new image it will be:
|
What does it do?
Rename the main binary into "moonbeam" and also provides a public docker image associated with that binary.
What important points reviewers should know?
We need to keep the previous docker image for compatibility with ops for now.
Is there something left for follow-up PRs?
The stagenet PR will need to be merged after also to keep providing the alphanet/stagenet configuration
What value does it bring to the blockchain users?
Having a better naming will avoid confusion for the users.
The new docker image will also make it easier for users to connect to one of our network.
Checklist