Commit Graph

27 Commits

Author SHA1 Message Date
Masco Skray
73aec02216 feat(install): add options to choose which judger component to build
For only web, there is no need to build checkers.
There are so many checkers that will slow down make speed.
Also for some situations, users can build checkers without runners.
2019-07-16 18:28:00 +08:00
Masco Skray
d413b746eb chore(install): separate services with docker-compose support
Without bundle, now you can choose to download single container.
For example, you can only download judger container to setup a new judger.
Also, the web container now no db and judger containing, except local sandbox.
You can use docker-compose to get every single container work together from now.
Single DB this time uses the latest MySQL 8 version, so some preferences are different.
2019-07-16 17:26:05 +08:00
Masco Skray
28cd4ef8b8 style(web,install): set repo clone dir as work dir
Clone repository files to /opt, and make this as work dir.
Can save disk space, make folder tidy, and easy to access.
2019-07-16 10:48:02 +08:00
Masco Skray
d92f7b1177 fix(install): mend bundle installation scripts
With thesedays' modify, installation scripts are not working properly.
Now do some modify, and set the default workdir to /opt.
2019-07-15 23:30:00 +08:00
Masco Skray
6cd6f10f6e style(web,install): change judge_client work path
When move out judger from bundle, no need to create judger account.
So these work paths will no longer exist. Prepare for future.
2019-07-15 16:19:05 +08:00
Masco Skray
46c8644a6e feat(web): support utf8mb4 character set (#39)
The utf8 set in MySQL is not real UTF-8.
Use utf8mb4 character set instead of utf8.
妈妈再也不用担心写东西用不了 Emoji 了~

BREAKING CHANGE: Old databases and tables need to be upgraded.
Better not use old database structure with new connect parameters.
2019-07-10 12:14:45 +08:00
Masco Skray
f72d0fda6c style(web): merge contests_asks table into main sql file
The web interface is merged but the table is not.
Merge it into a single SQL file, without execute PHP.
Redumped database structure with mysqldump command.
2019-07-10 11:04:51 +08:00
Masco Skray
a522d58f1d feat(install): separate judge apache access log to another file
When judger is polling, there will be many items under access log file.
It makes access log file very big and makes us difficult to check the log.
Move judge access log to another single file, make it easier to manage log files.
2019-07-08 13:20:30 +08:00
Masco Skray
e030a23ecb fix(install): support v8js upgrade to 2.1.1
The latest v8js 2.1.1 needs libv8 to be 6.9 or newer.
This fix applies new ppa source and installs libv8 7.5.
2019-07-08 12:56:08 +08:00
Masco Skray
d650f87f32 feat(judger): upgrade judge_client from py2 to py3
Upgrade judge_client from Python 2 to Python 3.
Add back and support a new judger update method.
Remove the Makefile outside of the folder which not contain any C file.
2019-06-28 14:00:20 +08:00
Masco Skray
c603c41e00 style(web): disable hack by default
Users rarely use hack, but it is enabled by default.
They need to disable it manually, and there are also many people do not now why should disable it.
Make the hack function disabled when creating a new problem.
2019-06-14 23:41:40 +08:00
mcfx0
69912ba9b3 feat(install, svn): remove svn (#45)
* feat(install, svn): remove svn

Remove everything related to svn.
Rename uoj-svn-lib to uoj-data-lib.
Save preparing problem data to /var/uoj_data/prepare/problem_id.

* Typo: uoj_date -> uoj_data

* add: backward compatibility

BREAKING CHANGE: Preparing problem data location is changed
You need to move files from /var/svn/problem/{id}/cur/{id}/1 to
/var/uoj_data/upload/{id}
2019-06-14 23:30:02 +08:00
Masco Skray
e0914a8f31 chore(install/bundle): let Dockerfile get current branch when building
Previous the branch in Dockerfile is specified manually in each branch.
But when someone want to change the branch or test they must modify it.
To make the process more intelligent, we will auto get the branch name.
And, to make the image smaller, we added --single-branch argument onto.
2019-04-20 10:51:03 +08:00
EarringYYR
3bc9419e3f fix(install/bundle): fix the wrong submission time
The submissions' submit time is not correct because the time zone of mysql isn't set. And this commit has fixed it.
2019-04-15 23:58:10 +08:00
Masco Skray
46aa7b7005 chore(install/bundle): improve installation procedure
In the past, we make the bundle installation as two parts.
Some of the steps such as compile judger is done at local.
And, to make it work, the steps may in a wrong order.
Now we make most of the steps working online automaticly,
and if you start the container you don't need to wait for
a long time to let it prepare. It will only reset passwords.
There are also some works moved to another place in order
to make the installation flow clearer and simpler.
Using more threads to boost judge_client's make.
Deleted some old things and doing something new.

TODAY: **Merry Christmas!**
2018-12-25 23:58:50 +08:00
Masco Skray
eff4c8ed9c style(install/bundle): make install script dash compatible
We wrote the script that can only be executed on bash.
But Ubuntu sets dash as its default shell environment.
One of the most difference is the POSIX standard echo,
another is parameter of chown can't be put to the end.
So we made some changes to let the script used widely.
And you will not face the syntax error when open this.
2018-12-15 19:57:57 +08:00
Masco Skray
fa5f1759e0 chore(install/bundle): set Dockerfile build from new branch name
We've just change php7 branch as the master branch, and php5 version turned into legacy.
To make docker automated build work correctly, the branch name specify now changed.
2018-12-15 13:16:24 +08:00
Masco Skray
47320c8758 fix(install/bundle): mysqld cannot start due to overlayfs of docker
This is an old enough bug while using MySQL version 5.5 with Ubuntu 14.04.
According to these issues form docker or moby repository:
https://github.com/docker/for-linux/issues/72
https://github.com/moby/moby/issues/35503
overlayfs only supports a subset of the POSIX standard.
But the problem does not arise when using aufs.
We do a little trick to MAKE MYSQL GREAT AGAIN.

NOTICE: Only people who are using docker may face this problem.
If you are using a bare-metal system or just running a virtual machine,
executing the installation script without using container works fine.
2018-10-10 23:50:50 +08:00
Masco Skray
b7c10c82c3 feat(judge_client/1/uoj_judger): support new version of compilers in Ubuntu 18.04
The compilers are all updated in Ubuntu 18.04 basesystem.
Add some defines for judger on compiling and replace web's display version to the real version.
To support new compilers we must modify the syscall list to let them run properly, otherwise they will error with "Dangerous Syscalls".
The Oracle JDK8 will read usagetracker profiles and record usage infomation, so disable it in order to not making junk files which may cause DGS.
2018-09-22 07:55:06 +08:00
Masco Skray
6cc048d9d1 style(judge_client/1/uoj_judger): remove compiler version specification
Due to historic reasons, the version and path of compilers are specified.
This will remove these specifications to make judger more adaptable.
Also provide defines to specify new version and keep for default.
2018-09-21 22:16:25 +08:00
Masco Skray
64683ad93f feat(install/bundle): install script adapt to Ubuntu 18.04
Update base system to Ubuntu 18.04.
.htaccess file's session path changed correctly.
Add gnupg install choice, due to base system has no gpg support.
Set DEBIAN_FRONTEND to noninteractive in order to prevent tzdata stuck.
Change Dockerfile's verion and buanch checkout method, in order to save space.
Fix mysql conf when not restart service and the database can't import judger info.
Change install.sh, support PHP7.2, update libv8 repo to artful, with missing php-mbstring.
The old JDK distfile mirrors are deprecated, changed to official.sed modded to get the latest jdk8.

BREAKING CHANGE: Ubuntu 14/16 users shouln't execute this script, due to config files and packages not the same.
2018-09-20 22:05:15 +08:00
Masco Skray
163dd8bb30 feat(install/bundle): add install script PHP7 and Ubuntu 16.04 support
In order to support PHP7 and Ubuntu 16.04, there must be some changes to make it runs properly.
The install script added php7 and mysql 5.7, newer v8js packages and supports, adjusted some config files.
Also used new way to detect install args, and change tab to 4-char-long space char.

BREAKING CHANGE: This branch can only be used for PHP7, and Ubuntu 14.04 users shouln't execute this script.
2018-09-20 17:38:21 +08:00
Masco Skray
2d0b0814fd fix(install/bundle): fix the wrong generation of our-root password and length
The last commit changed the installation script a lot, but made some mistakes on the genration of config.
It gens the $_svn_ourroot_password_ to $_svn_certroot_password_. Just fix it.
According to the version from @vfleaking, the judger_socket password and the our-root password is 32 chars long. Strengthen it.
There is also a *** space char on the end of a line. Kick it out.
2018-09-20 17:38:21 +08:00
ceabrobot
a1b372dd31 fix(install/bundle): fix the dev-build bug
This is a hotfix to build a image when the php7 branch is
developing. It will be reverted when this branch is merged to
the master branch.
2018-09-20 17:38:21 +08:00
ceabrobot
94c827e5b3 feat(install/bundle): change image and packages to ubuntu16.04
Change the base Docker image to ubuntu16.04 and change the LAMP
packages to support PHP7.

BREAKING CHANGE: the packages which will be installed has changed.
2018-09-20 17:38:21 +08:00
MascoSkray
babd30364e Initial commit for PHP7
This is the commit before changing environment to PHP7.
2018-09-20 17:38:09 +08:00
vfleaking
82ad3efce2 Initial commit 2018-09-20 17:21:40 +08:00