Alcor is a high-performance and large-scale implementation of the next-generation cloud networking control plane. Please follow the following instruction to set up your development environment and to deploy Alcor.
The Alcor controller project currently uses Apache Maven to manage the dependencies and its build. For development and functionality testing, we recommend using Ubuntu 18.04, or Windows 10 as Mac OS X is not fully tested. To set up your local development environment, we recommend to use fork-and-branch git workflow.
- Fork Alcor Github repository by clicking the Fork button on the upper right-hand side of Alcor home page.
- Make a local clone:
$ git clone https://github.com/<your_github_username>/alcor.git ~/alcor $ cd ~/alcor $ git submodule update --init --recursive
- Add a remote pointing back to the Alcor Official repository
$ git remote add upstream https://github.com/futurewei-cloud/alcor.git
- Always keep your forked repo (both local and remote) in sync with upstream. Try to run the following commands daily:
$ git checkout master $ git pull upstream master $ git push origin master
- Work in a feature branch
$ git checkout -b <new_branch_name> $ ... (make changes in your branch) $ git add . & git commit -m "commit message"
- Rebase your feature branch when there are changes in offical master, this is needed before submitting a PR
$ git fetch upstream $ git rebase upstream/master $ git push
- Push changes to your remote fork
$ git push origin <new_branch_name>
- Open a Pull Request on Alcor home page, notify community on Alcor Slack channels. You will need approval from at least one maintainer, who will merge your codes to Alcor master.
- Clean up after a merged Pull Request
$ git checkout master $ git pull upstream master $ git push origin master $ git branch -d <branch_name> $ git push --delete origin <branch_name>
To compile, run and test Alcor, please run mvn command to clean install the project for development.
$ mvn clean install
You could expect to see BUILD SUCCESS at the end of the build console.
Deploy an Ignite database for local testing and run unit tests. If this step passes, then you have everything needed to develop, test, and run Alcor.
$ ./scripts/test-prep.sh
$ mvn test
NOTE: This section is outdated. Please follow up with the community on Alcor Slack channels for latest instruction before the instructions get updated.
The previous steps allow you to compile and install Alcor. If you are interested in deploy alcor controller and its associated components (e.g. DB and cache) as docker containers, you can follow the next steps on any Docker supported operating system:
Set up docker images with the dependencies and run docker containers.
Windows:
PS > .\scripts\deploy.ps1
Ubuntu or Mac OS X:
$ ./scripts/deploy.sh
Test if your local controller is up.
curl localhost:8080/actuator/health
{"status":"UP"}
Now you are ready to use Alcor Controller.
To create your first VPC, you can deploy a sample VPC with one subnet and one port with the following script.
Ubuntu:
$ ./scripts/sampeVpcTest.sh localhost 8080 false
Next Step: