chunhualiao / freeCompilerCamp

Goal: a website to automatically train and certify compiler researchers and developers
10 stars 1 forks source link

refine the port plan #98

Closed chunhualiao closed 4 years ago

chunhualiao commented 4 years ago

the current plan for site ports is messy. Two non-standard ports are used.

main :80  --forwarded to--> main: 5020 : class-room 

main: 5010   l2 -->PWD

Idealy, the plan should just try to match standard and default ports used by PWD and class-room.

main:80 ---forwarded to --> main:4000  class-room website default port

main:8080 : haprox login/welcome site 

main:443: l2 -->pwd  site
ouankou commented 4 years ago

Original PWD deploys their training website on the GitHub pages instead of individual deployment using the port 4000. I created a similar one. Please check http://freecc.ouankou.com. It's a prototype deployed on Github pages and connected with our PWC server.

With this approach, we can worry about one less server. For updates, we commit a tutorial and wait for a short time. Then the classroom website will be regenerated automatically.

chunhualiao commented 4 years ago

Using gitpage is a much better solution. We should migrate to use it. Can you share some instructions so I can do it?

ouankou commented 4 years ago

I remember we have created a repository for this purpose. https://github.com/chunhualiao/freecompilercamp.github.io We can use this one and make some changes.

  1. We may use a new name, such as freecc-classroom or something else. The <username>.github.io only has a specific meaning when freecompilercamp is the owner's user name. For example, freecompilercamp.github.io is the default domain of the official GitHub page of user freecompilercamp. The particular name used by any other user won't be different than a regular name.

repo_name

  1. We can create a new branch named gh-pages. It will contain all the classroom files, which is the content of our compiler-classroom folder with some tweaks for GitHub pages.

  2. Then we can set up the domain. repo_settings

    • Choose the gh-pages branch as the source of Github Pages website.
    • The theme doesn't matter. We'll leave it as is and use our own.
    • The custom domain could be classroom.freecompilercamp.org or some other proper domain for now. Later after testing, we could change it to freecompilercamp.org for the official migration. After setting up this domain, we need to set the domain on GoDaddy as well.
    • HTTPS can't be selected here. If the training website uses HTTPS, the sandbox has to use that too. However, I've worked on the PWC with HTTPS for quite a while but still can't make it work. There are a few similar issues opened on PWD github repo. The developer replied that it has nothing to do with PWD and closed them (https://github.com/play-with-docker/play-with-docker/issues/287, https://github.com/play-with-docker/play-with-docker/issues/278).

Since I'm not the owner of this repository, I can't access the setting page. If you could complete the steps mentioned above, I can update GoDaddy settings and create the GitHub pages. I must verify each step first and then document the detailed instructions.

chunhualiao commented 4 years ago

lets find a time in Denver to do this together.

On Sat, Nov 9, 2019, 5:09 PM Anjia Wang notifications@github.com wrote:

I remember we have created a repository for this purpose. https://github.com/chunhualiao/freecompilercamp.github.io We can use this one and make some changes.

  1. We may use a new name, such as freecc-classroom or something else. The .github.io only has a specific meaning when freecompilercamp is the owner's user name. For example, freecompilercamp.github.io is the default domain of the official GitHub page of user freecompilercamp. The particular name used by any other user won't be different than a regular name.

[image: repo_name] https://user-images.githubusercontent.com/1269492/68536873-e17e9a80-0327-11ea-929e-795d7c074728.png

1.

We can create a new branch named gh-pages. It will contain all the classroom files, which is the content of our compiler-classroom folder with some tweaks for GitHub pages. 2.

Then we can set up the domain. [image: repo_settings] https://user-images.githubusercontent.com/1269492/68536942-56060900-0329-11ea-969a-114f1a509beb.png

  • Choose the gh-pages branch as the source of Github Pages website.
  • The theme doesn't matter. We'll leave it as is and use our own.
  • The custom domain could be classroom.freecompilercamp.org or some other proper domain for now. Later after testing, we could change it to freecompilercamp.org for the official migration. After setting up this domain, we need to set the domain on GoDaddy as well.
  • HTTPS can't be selected here. If the training website uses HTTPS, the sandbox has to use that too. However, I've worked on the PWC with HTTPS for quite a while but still can't make it work. There are a few similar issues opened on PWD github repo. The developer replied that it has nothing to do with PWD and closed them (play-with-docker/play-with-docker#287 https://github.com/play-with-docker/play-with-docker/issues/287, play-with-docker/play-with-docker#278 https://github.com/play-with-docker/play-with-docker/issues/278).

Since I'm not the owner of this repository, I can't access the setting page. If you could complete the steps mentioned above, I can update GoDaddy settings and create the GitHub pages. I must verify each step first and then document the detailed instructions.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/chunhualiao/freeCompilerCamp/issues/98?email_source=notifications&email_token=AAMNIRTCLRT3CMOUDZLXALTQS5NLFA5CNFSM4JLJMWK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDUS2XY#issuecomment-552152415, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMNIRQYAJS2HLR5TQTZJQTQS5NLFANCNFSM4JLJMWKQ .

chunhualiao commented 4 years ago

Ok. I think I finished all steps you mentioned.

The repo is https://github.com/freeCompilerCamp/freeCompilerCamp.github.io

It may take a bit time to be effective.

image

chunhualiao commented 4 years ago

@ouankou I may need your help for domain name set up. It is been quite a while and still not working.

 dig training.freecompilercamp.org  +nostats +nocomments +nocmd

; <<>> DiG 9.11.3-1ubuntu1.1-Ubuntu <<>> training.freecompilercamp.org +nostats +nocomments +nocmd
;; global options: +cmd
;training.freecompilercamp.org. IN      A
freecompilercamp.org.   71      IN      SOA     ns19.domaincontrol.com. dns.jomax.net. 2019110901 28800 7200 604800 600
chunhualiao commented 4 years ago

https://freecompilercamp.github.io/ is up and running. But terminal does not show up. We should try to migrate to use it so we have a much simpler deployment workflow.

chunhualiao commented 4 years ago

I fixed the issues. http://training.freecompilercamp.org/ now works with gitpages.

chunhualiao commented 4 years ago

Ok. We are moving to https://github.com/freeCompilerCamp , with two separated repos, two separated servers. Much better port plan.