You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@dubbo.apache.org by YunKun Huang <hy...@apache.org> on 2019/05/27 03:01:50 UTC

About current dubbo-website deployment process

hey,

I'm working on continuous deployment for Dubbo, and want to create a jenkins job for building & deploying dubbo-website for each commit.

I think currently we are using some manual process, my understanding is

1. commit doc change to asf-site branch
2. someone will run `docsite build` to generate website and push to asf-site branch
3. upload new website to somewhere? (a static web server maybe?)

My question is
1. for step 1 and step 2, should we keep source for website and generated files for website in two different branch
2. where do we host static files? in apache server?

 

Re: About current dubbo-website deployment process

Posted by YunKun Huang <ht...@gmail.com>.
I'm asking infra team to know more information about push access.
If we can do push from jenkins job, I will try push staff first and then we
can start split them

Huxing Zhang <hu...@apache.org> 于2019年5月29日周三 上午9:22写道:

> Hi,
>
> On Tue, May 28, 2019 at 1:40 PM YunKun Huang <hy...@apache.org> wrote:
> >
> > I think split source file and generated file into two branch will be
> much better:
> >
> > 1.source file branch will be the only truth of website, all commit and
> merge operation will impact website content. new contributor doesn't need
> care about other js files and html files.
> > 2.source file branch's size will reduce, people (or Jenkins CI) can
> clone it quickly
> > 3.Each time people run docsite build, it will generate many html and
> js[1] etc. Keep them at one branch may cause more push conflict and PR
> conflict.
> > 4.unnecessary file is sync to static file server, refer to [2]. There is
> no security issue but just not necessary
>
> +1 to split into two branches.
>
> >
> > And for current deployment process, we only commit website to github and
> apache server will sync it. so in order to build website in jenkins, we
> need at least one token or ssh key to push files.
>
> My understanding will be:   push code to source code branch  ->
> trigger jenkins build to generate static file -> push to static file
> branch  -> automatically sync to Apache server.
> I am not sure it could be achieved or not, maybe ask infra to confirm?
>
> > does it possible to push file directly to apache server?
>
> Not quit sure, but I think it is better to push back to Github because
> the generated files need to be kept, so that someone can test it
> locally.
>
> > or any one know the ticket link for this website setup work?
>
> It is here: https://issues.apache.org/jira/browse/INFRA-16207
>
>
> >
> > [1]:
> https://github.com/apache/dubbo-website/commit/1a5777396389c5f48dd796cc9ff03f9351bc2e14
> > [2]: http://dubbo.apache.org/webpack.config.js
> >
> > On 2019/05/27 13:10:02, Huxing Zhang <hu...@apache.org> wrote:
> > > Hi,
> > >
> > > On Mon, May 27, 2019 at 11:01 AM YunKun Huang <hy...@apache.org>
> wrote:
> > > >
> > > > hey,
> > > >
> > > > I'm working on continuous deployment for Dubbo, and want to create a
> jenkins job for building & deploying dubbo-website for each commit.
> > > >
> > > > I think currently we are using some manual process, my understanding
> is
> > > >
> > > > 1. commit doc change to asf-site branch
> > > > 2. someone will run `docsite build` to generate website and push to
> asf-site branch
> > > > 3. upload new website to somewhere? (a static web server maybe?)
> > >
> > > Step 3, statics files will be synced to Apache server automatically.
> > >
> > > >
> > > > My question is
> > > > 1. for step 1 and step 2, should we keep source for website and
> generated files for website in two different branch
> > >
> > > Keeping all files in one branch is just a simple solution. Do you see
> > > any advantage to keep in two different branches? I think it can be
> > > discussed.
> > >
> > > > 2. where do we host static files? in apache server?
> > >
> > > Yes. In Apache Server.
> > > >
> > > >
> > >
> > >
> > > --
> > > Best Regards!
> > > Huxing
> > >
>
>
>
> --
> Best Regards!
> Huxing
>

Re: About current dubbo-website deployment process

Posted by Huxing Zhang <hu...@apache.org>.
Hi,

On Tue, May 28, 2019 at 1:40 PM YunKun Huang <hy...@apache.org> wrote:
>
> I think split source file and generated file into two branch will be much better:
>
> 1.source file branch will be the only truth of website, all commit and merge operation will impact website content. new contributor doesn't need care about other js files and html files.
> 2.source file branch's size will reduce, people (or Jenkins CI) can clone it quickly
> 3.Each time people run docsite build, it will generate many html and js[1] etc. Keep them at one branch may cause more push conflict and PR conflict.
> 4.unnecessary file is sync to static file server, refer to [2]. There is no security issue but just not necessary

+1 to split into two branches.

>
> And for current deployment process, we only commit website to github and apache server will sync it. so in order to build website in jenkins, we need at least one token or ssh key to push files.

My understanding will be:   push code to source code branch  ->
trigger jenkins build to generate static file -> push to static file
branch  -> automatically sync to Apache server.
I am not sure it could be achieved or not, maybe ask infra to confirm?

> does it possible to push file directly to apache server?

Not quit sure, but I think it is better to push back to Github because
the generated files need to be kept, so that someone can test it
locally.

> or any one know the ticket link for this website setup work?

It is here: https://issues.apache.org/jira/browse/INFRA-16207


>
> [1]: https://github.com/apache/dubbo-website/commit/1a5777396389c5f48dd796cc9ff03f9351bc2e14
> [2]: http://dubbo.apache.org/webpack.config.js
>
> On 2019/05/27 13:10:02, Huxing Zhang <hu...@apache.org> wrote:
> > Hi,
> >
> > On Mon, May 27, 2019 at 11:01 AM YunKun Huang <hy...@apache.org> wrote:
> > >
> > > hey,
> > >
> > > I'm working on continuous deployment for Dubbo, and want to create a jenkins job for building & deploying dubbo-website for each commit.
> > >
> > > I think currently we are using some manual process, my understanding is
> > >
> > > 1. commit doc change to asf-site branch
> > > 2. someone will run `docsite build` to generate website and push to asf-site branch
> > > 3. upload new website to somewhere? (a static web server maybe?)
> >
> > Step 3, statics files will be synced to Apache server automatically.
> >
> > >
> > > My question is
> > > 1. for step 1 and step 2, should we keep source for website and generated files for website in two different branch
> >
> > Keeping all files in one branch is just a simple solution. Do you see
> > any advantage to keep in two different branches? I think it can be
> > discussed.
> >
> > > 2. where do we host static files? in apache server?
> >
> > Yes. In Apache Server.
> > >
> > >
> >
> >
> > --
> > Best Regards!
> > Huxing
> >



-- 
Best Regards!
Huxing

Re: About current dubbo-website deployment process

Posted by YunKun Huang <hy...@apache.org>.
I think split source file and generated file into two branch will be much better:

1.source file branch will be the only truth of website, all commit and merge operation will impact website content. new contributor doesn't need care about other js files and html files.
2.source file branch's size will reduce, people (or Jenkins CI) can clone it quickly
3.Each time people run docsite build, it will generate many html and js[1] etc. Keep them at one branch may cause more push conflict and PR conflict.
4.unnecessary file is sync to static file server, refer to [2]. There is no security issue but just not necessary

And for current deployment process, we only commit website to github and apache server will sync it. so in order to build website in jenkins, we need at least one token or ssh key to push files.
does it possible to push file directly to apache server? or any one know the ticket link for this website setup work?

[1]: https://github.com/apache/dubbo-website/commit/1a5777396389c5f48dd796cc9ff03f9351bc2e14
[2]: http://dubbo.apache.org/webpack.config.js

On 2019/05/27 13:10:02, Huxing Zhang <hu...@apache.org> wrote: 
> Hi,
> 
> On Mon, May 27, 2019 at 11:01 AM YunKun Huang <hy...@apache.org> wrote:
> >
> > hey,
> >
> > I'm working on continuous deployment for Dubbo, and want to create a jenkins job for building & deploying dubbo-website for each commit.
> >
> > I think currently we are using some manual process, my understanding is
> >
> > 1. commit doc change to asf-site branch
> > 2. someone will run `docsite build` to generate website and push to asf-site branch
> > 3. upload new website to somewhere? (a static web server maybe?)
> 
> Step 3, statics files will be synced to Apache server automatically.
> 
> >
> > My question is
> > 1. for step 1 and step 2, should we keep source for website and generated files for website in two different branch
> 
> Keeping all files in one branch is just a simple solution. Do you see
> any advantage to keep in two different branches? I think it can be
> discussed.
> 
> > 2. where do we host static files? in apache server?
> 
> Yes. In Apache Server.
> >
> >
> 
> 
> -- 
> Best Regards!
> Huxing
> 

Re: About current dubbo-website deployment process

Posted by Huxing Zhang <hu...@apache.org>.
Hi,

On Mon, May 27, 2019 at 11:01 AM YunKun Huang <hy...@apache.org> wrote:
>
> hey,
>
> I'm working on continuous deployment for Dubbo, and want to create a jenkins job for building & deploying dubbo-website for each commit.
>
> I think currently we are using some manual process, my understanding is
>
> 1. commit doc change to asf-site branch
> 2. someone will run `docsite build` to generate website and push to asf-site branch
> 3. upload new website to somewhere? (a static web server maybe?)

Step 3, statics files will be synced to Apache server automatically.

>
> My question is
> 1. for step 1 and step 2, should we keep source for website and generated files for website in two different branch

Keeping all files in one branch is just a simple solution. Do you see
any advantage to keep in two different branches? I think it can be
discussed.

> 2. where do we host static files? in apache server?

Yes. In Apache Server.
>
>


-- 
Best Regards!
Huxing

Re:About current dubbo-website deployment process

Posted by kezhenxu94 <ke...@163.com>.
> 2. where do we host static files? in apache server?

We host the webpages as GitHub pages, which serves the files(the asf-site branch files here) in GitHub  repos as websites, 

> 1. for step 1 and step 2, should we keep source for website and generated files for website in two different branch

because of 2, the generated files must be kept, and for easy mantainance(maybe?), we seperate the sources files and generated files in two branches





在 2019-05-27 11:01:50,"YunKun Huang" <hy...@apache.org> 写道:
>hey,
>
>I'm working on continuous deployment for Dubbo, and want to create a jenkins job for building & deploying dubbo-website for each commit.
>
>I think currently we are using some manual process, my understanding is
>
>1. commit doc change to asf-site branch
>2. someone will run `docsite build` to generate website and push to asf-site branch
>3. upload new website to somewhere? (a static web server maybe?)
>
>My question is
>1. for step 1 and step 2, should we keep source for website and generated files for website in two different branch
>2. where do we host static files? in apache server?
>
> 

Re:About current dubbo-website deployment process

Posted by ke...@163.com.
> 2. where do we host static files? in apache server?

We host the webpages as GitHub Pages, which serves the files(the asf-site branch files here) in GitHub  repos as websites, it's a tool provided by GitHub

> 1. for step 1 and step 2, should we keep source for website and generated files for website in two different branch

because of 2, the generated files must be kept, and for easy mantainance(maybe?), we seperate the sources files and generated files in two branches
在 2019-05-27 11:01:50,"YunKun Huang" <hy...@apache.org> 写道:
hey,

I'm working on continuous deployment for Dubbo, and want to create a jenkins job for building & deploying dubbo-website for each commit.

I think currently we are using some manual process, my understanding is

1. commit doc change to asf-site branch
2. someone will run `docsite build` to generate website and push to asf-site branch
3. upload new website to somewhere? (a static web server maybe?)

My question is
1. for step 1 and step 2, should we keep source for website and generated files for website in two different branch
2. where do we host static files? in apache server?

 

Re: About current dubbo-website deployment process

Posted by YunKun Huang <ht...@gmail.com>.
yeah. I try nvm in jenkins, but looks like it will install for current user
(jenkins) and there are some limitations for global install (PR[1] raised
to avoid global install).

I success using docker in apache jenkins to build htmls (refer to build
url[2])

The only issue now is how to deploy change (or push changes back to
asf-site branch), I already confirmed apache jenkins (node name
'git-website') have access to gitbox, but for github repo, still waiting
Infra team to confirm.

[1]: https://github.com/apache/dubbo-website/pull/378
[2]:
https://builds.apache.org/job/Apache%20Dubbo/job/apache-dubbo-website-deployment/

Ian Luo <ia...@gmail.com>

> Yunkun,
>
> The build for dubbo website requires particular node's version. If you want
> to automate its build process, you need to consider to use 'nvm'. You can
> find more details from website's README
>
> Thanks,
> -Ian.
>
>
> On Mon, May 27, 2019 at 11:01 AM YunKun Huang <hy...@apache.org> wrote:
>
> > hey,
> >
> > I'm working on continuous deployment for Dubbo, and want to create a
> > jenkins job for building & deploying dubbo-website for each commit.
> >
> > I think currently we are using some manual process, my understanding is
> >
> > 1. commit doc change to asf-site branch
> > 2. someone will run `docsite build` to generate website and push to
> > asf-site branch
> > 3. upload new website to somewhere? (a static web server maybe?)
> >
> > My question is
> > 1. for step 1 and step 2, should we keep source for website and generated
> > files for website in two different branch
> > 2. where do we host static files? in apache server?
> >
> >
> >
>

Re: About current dubbo-website deployment process

Posted by Ian Luo <ia...@gmail.com>.
Yunkun,

The build for dubbo website requires particular node's version. If you want
to automate its build process, you need to consider to use 'nvm'. You can
find more details from website's README

Thanks,
-Ian.


On Mon, May 27, 2019 at 11:01 AM YunKun Huang <hy...@apache.org> wrote:

> hey,
>
> I'm working on continuous deployment for Dubbo, and want to create a
> jenkins job for building & deploying dubbo-website for each commit.
>
> I think currently we are using some manual process, my understanding is
>
> 1. commit doc change to asf-site branch
> 2. someone will run `docsite build` to generate website and push to
> asf-site branch
> 3. upload new website to somewhere? (a static web server maybe?)
>
> My question is
> 1. for step 1 and step 2, should we keep source for website and generated
> files for website in two different branch
> 2. where do we host static files? in apache server?
>
>
>