-
Notifications
You must be signed in to change notification settings - Fork 276
Development Environment
Mike Yang edited this page Oct 14, 2022
·
14 revisions
- Download and install IntelliJ
- Checkout Ambry source
git clone git@github.com:linkedin/ambry.git
- Update libraries and generate IntelliJ project files
cd <ambry.project.dir>
./gradlew build
./gradlew idea
- Create IntelliJ workspace
- Open Intellij and click open project pointing to <ambry.project.dir>
- Apply the code style XML file provided in this repository (ide/intellij/codestyles/ambry-style.xml):
- In Intellij, open preferences -> editor -> code style
- Click the "Manage..." button next to "Scheme"
- Click "Import..."
- Select "Intellij IDEA code style XML"
- Choose .../ambry/ide/intellij/codestyles/ambry-style.xml
- Select the imported scheme and apply the settings
- Install and prepare Eclipse
- Download and install Eclipse (Indigo or Juno is recommended);
- Install IvyIDE plugin as described here. This will allow to automatically create classpath containers starting from ivy files;
- Checkout Ambry source
git clone git@github.com:linkedin/ambry.git <ambry.project.dir>
- Generate Eclipse project files
cd <ambry.project.dir>
- Bootstrap gradle wrapper with: gradle
- Generate the eclipse projects with: ./gradlew eclipse. This command will create eclipse projects for every project defined in Ambry.
- Create the Eclipse workspace
- Open Eclipse and create a new workspace;
- Import the generated project (File -> Import -> General -> Existing Projects into Workspace)
- Navigate to the <ambry.project.dir>. Eclipse will find the projects generated by the previous command;
- Select the projects you want to import;
- You should see the projects you have imported.
- You will need regenerate the projects and refresh eclipse every time there is a change in the projects dependencies. In other words, you need to run ./gradlew eclipse and refresh eclipse.
For now, some integration tests require manual setup of MySQL. This setup will be automated in the future.
- Install MySQL. It is easiest to install using homebrew:
brew install mysql
Note that the root user password will be empty by default. Please change it if you wish to expose your local db to the network. - Start MySQL:
mysql.server start
- Set up test user (called "travis" for now):
mysql -e 'CREATE USER 'travis'@'localhost';' -uroot
mysql -e 'GRANT ALL PRIVILEGES ON * . * TO 'travis'@'localhost';' -uroot
mysql -e 'FLUSH PRIVILEGES;' -uroot
- Set up test databases and tables:
cd /project/directory/for/ambry
mysql -e 'CREATE DATABASE AccountMetadata;' -uroot
mysql -e 'USE AccountMetadata; SOURCE ./database/account_metadata/schema/create_tables.ddl;' -uroot
mysql -e 'CREATE DATABASE ambry_container_storage_stats;' -uroot
mysql -e 'USE ambry_container_storage_stats; SOURCE ./database/accountstats/schema/ddl/table.sql;' -uroot
mysql -e 'CREATE DATABASE AmbryNamedBlobs;' -uroot
mysql -e 'USE AmbryNamedBlobs; SOURCE ./database/AMBRYBLOBS/schema/ddl/00-table.sql;' -uroot
- If you wish to stop the MySQL process after you are finished testing, you can run
mysql.server stop
- Getting Started
- API
- Configuration
- Design
- Implementation
- Operations
- FAQ
- Project
- Future Work