hjr3 / weldr

A HTTP 1.1 proxy written in Rust using tokio.
Apache License 2.0
218 stars 20 forks source link

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

Closed maniankara closed 7 years ago

maniankara commented 7 years ago

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

hjr3 commented 7 years ago

@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 commented 7 years ago

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

hjr3 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

@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 commented 7 years ago

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

hjr3 commented 7 years ago

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

maniankara commented 7 years ago

Looks much better now !

hjr3 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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

hjr3 commented 7 years ago

@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 commented 7 years ago

@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 commented 7 years ago

ping @hjr3

hjr3 commented 7 years ago

@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.

maniankara commented 7 years ago

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

maniankara commented 7 years ago

@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 commented 7 years ago

Merged as 45dccf016c343b94906b24bc3b1e0c8d70f0568d

hjr3 commented 7 years ago

@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 https://github.com/hjr3/weldr/issues/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 commented 7 years ago

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