Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new github action to replace travis-ci (includes dependency upgrades) #3195

Merged
merged 69 commits into from
Jan 28, 2021

Conversation

willgearty
Copy link
Member

@willgearty willgearty commented Jan 14, 2021

Travis-CI no longer offers unlimited testing for open source projects, so we need to migrate to Github Actions. Github Actions only supports Ubuntu 16+, and since @milescalabresi is moving us to Ubuntu 20 on AWS, I decided to go with that, which then required updates to node.js (v.0.10.x to v.14.x LTS), less (v.1.3.1 to v.1.7.5), and Bootstrap (v.2.0.2 to v.2.3.2). For the Bootstrap update, I merged all of our custom changes and did a quick glance at a few pages to make sure everything looked ok. The node.js and less upgrades shouldn't cause any notable/visible changes.

Everything runs smoothly on Github Actions (including all tests passing, woo!). Everything also runs smoothly on my dev server which is also on Ubuntu 20 (see notes below and new upgrade instructions in vagrant.rst). Following this, all developers will need to migrate to new vms.

Given all of these changes, it should be noted that it's very possible (and almost 100% likely) that main will never work again on the current production server (including dev3). Of course, cherry picks should still work for individual chapters, but the entire development branch will probably not work.

In terms of the LGTM and CodeQL alerts, they all have to do with Bootstrap, so I say we just ignore those.

Notes on how I created the new dev VM (I ran into numerous issues trying to update our old dev VM):

  1. I started with the VM here: https://app.vagrantup.com/bento/boxes/ubuntu-20.04 (so set config.vm.box to bento/ubuntu-20.04 in your Vagrantfile)

Once you've got the VM running, you'll then need to modify the partition scheme such that there is an unmounted partition named keep_1 within the vgvagrant volume group. However, by default, the root partition in this volume group takes up the full space, so we'll need to shrink it. Unfortunately, we'll need to unmount this root partition and can only do that if we are running the server from the Ubuntu install CD.

  1. Download the Ubuntu install .iso here: https://ubuntu.com/download/desktop.
  2. Open VirtualBox and click on the VM that you just installed in step 1. Then click on the "Settings" button. Click "Storage", then, next to "Controller: IDE Controller", click the "Add optical drive" button. Click "Add" and browse to the Ubuntu install .iso file you just downloaded. Then click "Choose". Now click on "System" and move the "Optical" drive to the top of the boot order by clicking it and clicking the up button (and make sure the "Optical" drive has a checkmark).
  3. Run the virtual machine (username should be ubuntu with no password).
  4. Use the arrow keys to highlight the first option ("Try ubuntu" or something like that) and add this to the end of the text line that appears systemd.unit=multi-user.target. Then hit the enter key. (https://askubuntu.com/a/943701/1174698)
  5. Follow the instructions here to shrink the root partition (you shouldn't need to do the vgchange line). I used -10G for lvreduce to shrink the partition by 10 GB.
  6. Power off the virtual machine. Go back into the VM settings and restore the hard disk to the top of the boot order. You should also remove the Ubuntu .iso from the Storage options.
  7. Now start the virtual machine again (username and password should be "vagrant").
  8. Now run the following line to create a new unmounted partition: sudo lvcreate -l 100%FREE -n keep_1 vgvagrant (https://www.digitalocean.com/community/tutorials/how-to-use-lvm-to-manage-storage-devices-on-ubuntu-18-04#creating-a-logical-volume-from-all-remaining-free-space).
  9. Optional: run update_deps.sh to update your dependencies.
  10. Export the VM by running vagrant package (this is back in your own file system). You're done!

Fixes #2144 and fixes #2560.

@willgearty willgearty added this to the Stable Release 13 milestone Jan 14, 2021
@lgtm-com

This comment has been minimized.

@willgearty willgearty added dependencies Pull requests that update a dependency file Development labels Jan 17, 2021
@willgearty willgearty changed the title Add new github action to replace travis-ci Add new github action to replace travis-ci (requires many dependency upgrades) Jan 17, 2021
@lgtm-com

This comment has been minimized.

@willgearty willgearty changed the title Add new github action to replace travis-ci (requires many dependency upgrades) Add new github action to replace travis-ci (includes dependency upgrades) Jan 17, 2021
@lgtm-com

This comment has been minimized.

@lgtm-com

This comment has been minimized.

@lgtm-com

This comment has been minimized.

@lgtm-com

This comment has been minimized.

Copy link
Contributor

@kkbrum kkbrum left a comment

Choose a reason for hiding this comment

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

Worked for me, and I logged in, set up a program, imported all the stuff, teacherreg, and studentreg. I think that's a good enough initial testing run. My one comment is to maybe save a copy of main as "SR 12.5" or something so that we have a workable copy if needed before merging this. Up to you though!

@willgearty
Copy link
Member Author

OK, I've made a backup branch named "main-backup" in case we need to go back.

@willgearty willgearty merged commit 0d4c05a into main Jan 28, 2021
@willgearty willgearty deleted the travis-actions branch January 28, 2021 02:39
willgearty added a commit that referenced this pull request Jan 28, 2021
willgearty added a commit that referenced this pull request May 27, 2021
* Initial docs for stable release 13

* Docs for #3116, #3117, and #3118

* Added docs about django upgrade

* Docs for #3128

* Docs for #3129, #3133, #3134, and #3137

* Docs for #3156 and #3153

* Docs for #3174, #3163, and #3184

* Docs for #3139, #3140, and #3141

* Docs for #3143, #3150, #3154, #3160, #3162, and #3168

* Docs for #3171, #3185, #3186, and #3188

* Docs for #3131 and #3189

* Docs for #3149 and #3190

* Docs for #3193, #3194, #3195, #196, and #3197

* Clarification

* Docs for #3192, #3201, #3209, and #2248

* Docs for #3204, #3212, #3214, #3205, 9fd073c, and #3226

* Docs for #3232, de5861c, #3231, #3233, #3234, #3237, #3238, and #3239

* Fix indent

* Docs for #3227 and #3235

* Add missing word

* spelling

* Docs for e57581f, #3255, #3253, #3257, and #3249

* Docs for #3254, #3260, and #3262

* Docs for #3263, #3272, #3240, #3264, #3266, and #3270

* clarifications

* Docs for #3283 and #3252

* Docs for #3288 and misc commits

* Docs for #3292, #3311, #3286, #3289, and #3279

* Docs for a377f0d; move note

* Docs for #3315, #3290, and #3322

* Docs for #3273 and #3317

* Final edits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file Development Server setup Testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade Ubuntu from 12.04 Update Vagrant VM image to a newer Ubuntu
2 participants