Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Releases and release candidates are tags marking specific versions of all the repos, packaged as a box file.  Take care with the steps to create and tag these.  It's surprising, but you have to edit files to refer to the tags before you can create the tag.

Make a test tag

Because real releases are made from tags, and very occasionally the difference between tags and branches is important, all builds should be done from tags.  To make the vagrant boxes from a tag, but not yet mark the release, we'll make a test tag.  The tag should use your personal prefix ("you/"), and be named for the release you are working on, but with an additional .n suffix:

...

Update Vagrantfile

Even if you will not be making a new box file for this version, you need to update the Vagrant files.  The release Vagrant files (vagrant/release/devstack/Vagrantfile and vagrant/release/fullstack/Vagrantfile) will need to be updated to pull down the correct box file when the appropriate value is set for the OPENEDX_RELEASE environment variable:

Code Block
openedx_releases = {
    "open-release/zebrawood.master you/test/zebrawood.1rc1.1

The .1 suffix is so that you can make a .2 if something needs to be fixed.

Make Vagrant boxes

You do not need to make new devstack boxes for every release candidate, or for the final release, but you do need to make new fullstack boxes for every release.  A vagrant box is a pre-made snapshot that can speed the installation process.  The first release candidate of every Open edX release should have a new devstack box, but subsequent candidates, and the final version, can probably do without.

Clone the configuration repo and build Vagrant boxes from scratch for fullstack and possibly devstack. Make sure to use the "base" version, not the "release" version.

Code Block
languagebash
git clone https://github.com/edx/configuration.git
cd configuration
export OPENEDX_RELEASE=" => "zebrawood-devstack-2016-02-17",
    "open-release/zebrawood.1rc1" => "zebrawood-devstack-2016-02-17",
}

Release candidates have a generic clause ".master" (for testing with the branch name), and a specific clause ".1rc1" for actual use with the tag.

Also update the default, if this is a final (not rc) release:

Code Block
openedx_releases.default = "zebrawood-fullstack-2016-02-17"

Make these changes on the release branch and on master of configuration.

Make a test tag

Because real releases are made from tags, and very occasionally the difference between tags and branches is important, all builds should be done from tags.  To make the vagrant boxes from a tag, but not yet mark the release, we'll make a test tag.  The tag should use your personal prefix ("you/"), and be named for the release you are working on, but with an additional .n suffix:

Code Block
tag_release --doit --tag --skip-invalid --override-ref open-release/zebrawood.master you/test/zebrawood.1rc1.1
git checkout $OPENEDX_RELEASE
python -m virtualenv venv
. venv/bin/activate
make requirements
cd vagrant/base/fullstack     # or devstack
vagrant up

If you run into issues with the process of building Vagrant boxes from scratch, work with devops.

To reduce the size of the box file, ssh into the box and execute this command:

Code Block
sudo /edx/app/edx_ansible/pre-box		# takes about 4 minutes

Once the box is up and running, export it to a box file. (You need to run the commands on the host computer, not on the Vagrant virtual machine.)

Code Block
languagebash
vagrant package							# can take 8 to 12 minutes

This will create a package.box file. 

Upload Vagrant boxes

Rename the file with the name of the release, and the date, but do not use "rc1" or any other version tag.  Boxes can be used for multiple versions of a release. Putting the version in the name just confuses people.  Name the box like this:  $RELEASE-$TYPE-$DATE.box, for example: 

zebrawood-devstack-2016-02-17.box

In the unlikely event of having to make and release a second box in the same day, add a "-2" suffix: zebrawood-devstack-2016-02-21-2.box

Either you have credentials to upload files to Amazon S3, or you don't.

  • If you have Amazon S3 credentials:

    Code Block
    aws --profile=edx s3 cp package.box s3://edx-static/vagrant-images/zebrwood-devstack-2016-02-17.box --acl public-read
    aws --profile=edx s3 cp package.box s3://edx-static/vagrant-images/zebrawood-fullstack-2016-02-17.box --acl public-read
  • If you don't have Amazon S3 credentials:
    • Upload the file to Google Drive
    • Tell Devops, they will move it to Amazon S3.

Update box directory

Update the wiki page that lists the boxes: Open edX Releases.

  • Add the new box, and a new row in the table if need be. Be careful when editing URLs that you change both the text and the link.
  • Click the torrent URLs to make sure they work. If they 404, then the file doesn't exist, or has the wrong permissions.  If you get "The s3.amazonaws.com page isn’t working. s3.amazonaws.com didn’t send any data," then click it again until it gives you a file of about 220Kb.  Amazon takes a while to get the torrent file going.

Update Vagrantfile

Even if you did not make a new box file for this version, you need to update the Vagrant files.  The release Vagrant files (vagrant/release/devstack/Vagrantfile and vagrant/release/fullstack/Vagrantfile) will need to be updated to pull down the correct box file when the appropriate value is set for the OPENEDX_RELEASE environment variable:

Code Block
openedx_releases = {
    "open-release/zebrawood.master" => "zebrawood-devstack-2016-02-17",
    "open-release/zebrawood.1rc1" => "zebrawood-devstack-2016-02-17",
}

Release candidates have a generic clause ".master" (for testing with the branch name), and a specific clause ".1rc1" for actual use with the tag.

Also update the default, if this is a final (not rc) release:

Code Block
openedx_releases.default = "zebrawood-fullstack-2016-02-17"

...

.1

The .1 suffix is so that you can make a .2 if something needs to be fixed.

Make Vagrant boxes

You do not need to make new devstack boxes for every release candidate, or for the final release, but you do need to make new fullstack boxes for every release.  A vagrant box is a pre-made snapshot that can speed the installation process.  The first release candidate of every Open edX release should have a new devstack box, but subsequent candidates, and the final version, can probably do without.

Clone the configuration repo and build Vagrant boxes from scratch for fullstack and possibly devstack. Make sure to use the "base" version, not the "release" version.

Code Block
languagebash
git clone https://github.com/edx/configuration.git
cd configuration
export OPENEDX_RELEASE=you/test/zebrawood.1rc1.1
git checkout $OPENEDX_RELEASE
python -m virtualenv venv
. venv/bin/activate
make requirements
cd vagrant/base/fullstack     # or devstack
vagrant up

If you run into issues with the process of building Vagrant boxes from scratch, work with devops.

To reduce the size of the box file, ssh into the box and execute this command:

Code Block
sudo /edx/app/edx_ansible/pre-box		# takes about 4 minutes

Once the box is up and running, export it to a box file. (You need to run the commands on the host computer, not on the Vagrant virtual machine.)

Code Block
languagebash
vagrant package							# can take 8 to 12 minutes

This will create a package.box file. 

Upload Vagrant boxes

Rename the file with the name of the release, and the date, but do not use "rc1" or any other version tag.  Boxes can be used for multiple versions of a release. Putting the version in the name just confuses people.  Name the box like this:  $RELEASE-$TYPE-$DATE.box, for example: 

zebrawood-devstack-2016-02-17.box

In the unlikely event of having to make and release a second box in the same day, add a "-2" suffix: zebrawood-devstack-2016-02-21-2.box

Either you have credentials to upload files to Amazon S3, or you don't.

  • If you have Amazon S3 credentials:

    Code Block
    aws --profile=edx s3 cp package.box s3://edx-static/vagrant-images/zebrwood-devstack-2016-02-17.box --acl public-read
    aws --profile=edx s3 cp package.box s3://edx-static/vagrant-images/zebrawood-fullstack-2016-02-17.box --acl public-read
  • If you don't have Amazon S3 credentials:
    • Upload the file to Google Drive
    • Tell Devops, they will move it to Amazon S3.

Update box directory

Update the wiki page that lists the boxes: Open edX Releases.

  • Add the new box, and a new row in the table if need be. Be careful when editing URLs that you change both the text and the link.
  • Click the torrent URLs to make sure they work. If they 404, then the file doesn't exist, or has the wrong permissions.  If you get "The s3.amazonaws.com page isn’t working. s3.amazonaws.com didn’t send any data," then click it again until it gives you a file of about 220Kb.  Amazon takes a while to get the torrent file going.

Test upgrade to master (??)

Create a devstack VM and a fullstack VM from the previous Open edX release:

...