Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Fix for saving in rpm, deb and docker repo/registries #84

Closed
wants to merge 13 commits into from
Closed

Fix for saving in rpm, deb and docker repo/registries #84

wants to merge 13 commits into from

Conversation

maniankara
Copy link
Contributor

Fix for #70.
Here are the some assumptions which needs to be modification:

  • package cloud: For now I have deployed it to my own fork repo maniankara/weldr which needs to be changed.
  • The package creation is done with docker only for all deb and x86_64 rpm. E.g. travis log, please comment.
  • Deployment to docker repository is missing.

anoop added 3 commits March 25, 2017 00:06
 - fpm (for package creation) and package-cloud (deploy package) gems to install
 - create weldr deb package with target opt/weldr
 - Added deploy details with maniankara account (for now) for debian/stretch
.travis.yml Outdated
- mkdir opt
- cp target/debug/weldr opt
# Use the same docker image as much as possible
- docker run -v "$(pwd):/src/" cdrx/fpm-centos:7 -s dir -t deb -v 0.1.0 -n weldr -C /src opt/weldr
Copy link
Owner

Choose a reason for hiding this comment

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

Should we replace the 0.1.0 version with $TRAVIS_TAG?

The user of docker here is fine with me. I originally thought it was going to be slow and was going to suggest doing something like if [ -n "$TRAVIS_TAG" ]; then something when tag set; fi but it looks quite fast.

However, now that I think about it we want to deploy the static binary version via cargo build --target x86_64-unknown-linux-musl --release. That is going to take a long time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

$TRAVIS_TAG

Oh, I missed that, actually I was using $(cargo pkgid| awk -F'#' {'print $2'}) in my sample branch.

if [ -n "$TRAVIS_TAG" ];

yes, this makes more sense

x86_64-unknown-linux-musl

yes, looks like (ref).
Should I use the gnu for now?

Copy link
Owner

Choose a reason for hiding this comment

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

    x86_64-unknown-linux-musl

yes, looks like (ref).
Should I use the gnu for now?

The musl build target works fine. See the DOCKER.md. If that is not working though, we can do a normal release cargo build --release and store that resulting binary in the deb/rpm package.

@hjr3
Copy link
Owner

hjr3 commented Mar 25, 2017

@maniankara This looks great! I made a comment about the after_success step. Also, I made you a collaborator on https://packagecloud.io/hjr3/weldr and https://hub.docker.com/r/hjr3/weldr/ . Let me know if you are able to access those.

@maniankara
Copy link
Contributor Author

@hjr3 packagecloud looks better and I didnt get access to docker hub. My user account there is same as in here.

@hjr3
Copy link
Owner

hjr3 commented Mar 26, 2017

Hmm I added you as a collaborator for docker hub before:

screen shot 2017-03-26 at 8 03 38 am

What error are you seeing?

@maniankara
Copy link
Contributor Author

There are no errors. I see only this (without edit icons, only general tabs etc.).
screenshot_20170327_204845

But I havent tried pushing to there, I will try and let you know.

@hjr3
Copy link
Owner

hjr3 commented Mar 28, 2017

@maniankara ya let me know. if that does not work, i will just create an organization and go from there. maybe i should create the org now? cc @yanns

@yanns
Copy link
Collaborator

yanns commented Mar 28, 2017

@hjr3 if you find time, an organization would be nice.

@hjr3
Copy link
Owner

hjr3 commented Mar 28, 2017

@maniankara @yanns i created https://hub.docker.com/u/weldr/dashboard/ and added you both as admins

@maniankara
Copy link
Contributor Author

Looks much better now !

@maniankara maniankara changed the title Fix for #70 Fix for saving in rpm, deb and docker repo/registries Mar 31, 2017
@hjr3
Copy link
Owner

hjr3 commented Mar 31, 2017

This looks great. I will change the packagecloud repo to an org and that looks to be it.

Is there anything else left to do?

@maniankara
Copy link
Contributor Author

Yes. The binary is not statically linked. I can fix that quickly but, seems there might be support for x86_64 linux musl after all.

@maniankara
Copy link
Contributor Author

Ah, I forgot the docker authentication part, the user/password needs to be somehow encrypted.

@hjr3
Copy link
Owner

hjr3 commented Apr 1, 2017

@maniankara I looked at https://github.com/rust-lang/rust/blob/master/.travis.yml and they do the musl stuff within docker as well. I know https://github.com/emk/rust-musl-builder is a pretty popular docker image that has rust and musl.

That also reminds me, we should only deploy from the stable build that has a tag.

We can encrypt private variables for the docker user/pass via the travis gem. Read https://docs.travis-ci.com/user/environment-variables/#Defining-encrypted-variables-in-.travis.yml for more details.

I looked and packagecloud.io does not have "organizations". I created a new weldr user and we should put the rpm/deb files at https://packagecloud.io/weldr/weldr . You are already a collaborator. I am removing https://packagecloud.io/hjr3/weldr

@maniankara
Copy link
Contributor Author

maniankara commented Apr 1, 2017

@maniankara I looked at https://github.com/rust-lang/rust/blob/master/.travis.yml and they do the musl stuff within docker as well.

This is great. Now weldr is using that :)

That also reminds me, we should only deploy from the stable build that has a tag.

Yes, this has been the case, if you think something is missing, please feel free to point out :)

We can encrypt private variables for the docker user/pass via the travis gem. ...

Yes, I know about this and that's how the packagecloud thing works. However, I think you could add the credentials to dockerhub yourself for the weldr user, unless you transfer the credentials to me via something.

... packagecloud.io ...

Same, please suggest how to handle credentials here as well.

@maniankara
Copy link
Contributor Author

ping @hjr3

@hjr3
Copy link
Owner

hjr3 commented Apr 7, 2017

@maniankara sorry for the delay! I was out of commission for a while and still catching up.

That also reminds me, we should only deploy from the stable build that has a tag.
Yes, this has been the case, if you think something is missing, please feel free to point out :)

I should have worded this better. The .travis.yml file will run on stable, beta and nightly versions of Rust. We should only deploy from the stable version of Rust. As is, I think we will deploy 3 times.

I think I understand what you mean with regards to credentials. I will push a commit shortly.

hjr3 and others added 3 commits April 7, 2017 09:06
@maniankara
Copy link
Contributor Author

@hjr3 Ah. Alright. Now I got the idea.
I have made a mess with the merge commit, etc. Hope its okay now.

@maniankara
Copy link
Contributor Author

@hjr3 If you think we are done with this PR, I have recently learnt rust (starting with Tokio). What do you think would be a good bug to start with. I took a look at all of the open ones, some seemed to be old (not needed anymore?), linked (ordered) etc. Please suggest :)

hjr3 added a commit that referenced this pull request Apr 10, 2017
@hjr3
Copy link
Owner

hjr3 commented Apr 10, 2017

Merged as 45dccf0

@hjr3
Copy link
Owner

hjr3 commented Apr 10, 2017

@maniankara thank you so much for helping with this PR.

If you want to work on something small, I think one of the items in #55 is an easy to place to start. That code is in https://github.com/hjr3/weldr/blob/master/src/proxy.rs in the form of simple functions. Maybe section 3.2.1 or 3.2.4?

@hjr3
Copy link
Owner

hjr3 commented Apr 13, 2017

@maniankara i landed a big PR today that unlocks a lot of progress. I added some more help wanted issues to the list.

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

Successfully merging this pull request may close these issues.

3 participants