-
-
Notifications
You must be signed in to change notification settings - Fork 32
Hacking on AppCenter Dashboard
We'd love your help hacking on AppCenter Dashboard (codenamed "houston")! Getting a local development environment set up is easy, and we've prepared a short guide to walk you through step-by-step. Just follow along below, and if you have any issues, don't hesitate to ask for help.
Firstly, you will need node
.
Depending on your distribution of choice, you might need to download and compile
node from the website. Keep in mind that Houston requires
node version 5.0.0
or above.
Second, you will need mongodb
as a database, and libssl
as a dependency.
sudo apt-get install mongodb libssl-dev
And lastly you will need aptly
for repo management.
Please direct your attention to the Aptly download page for details on installing and running.
- You'll need to set up Houston's config file,
config.js
. Copy the config file template:
cp config.example.js config.js
- Then, create a GitHub OAuth application for testing AppCenter Dashboard: https://github.com/settings/applications/new.
Name the application something like "Houston Local", and set the homepage and callback URLs to your local machine, like this:
Homepage URL: http://localhost:3000
Authorization callback URL: http://localhost:3000/auth/github/callback
It should look something like this:
-
Click 'Register application', and then copy and paste the newly created application's Client ID into
config.js
undergithub.clientID
and copy the Client Secret undergithub.secret
.Your
config.js
should now include a section that looks something like this:
// https://github.com/settings/developers
export const github = {
client: '1e9ec151a7728abaa304',
secret: '9ccde02a1633b27232ee07662b7a688c43018b1f',
// Post data to GitHub?
post: false,
// Enable GitHub hooks?
hook: false
}
The repository schema for AppCenter Dashbaord, while flexible, does make assumptions on your setup. First, you will need two repositories. By default they should be named 'review' and 'houston'.
On release of a new project, AppCenter Dashboard will automatically update your published repository with a newly created snapshot. This means that your stable repo will never be directly published, but instead, an easily manageable snapshot will. As such, you will need a blank snapshot for both repositories. After that you will want to publish the blank snapshots as a placeholder.
tl;dr: Run these commands on a local instance of Aptly after you get it setup and you should have be all setup for AppCenter Dashboard.
sudo aptly repo create review
sudo aptly repo create houston
sudo aptly snapshot create review empty
sudo aptly snapshot create houston empty
sudo aptly publish snapshot -architectures=amd64,armhf -distribution=xenial review
sudo aptly publish snapshot -architectures=amd64,armhf -distribution=xenial houston
After configuration, running AppCenter Dashboard is straightforward, just run:
-
npm install
to fetch needed dependencies -
npm run build
to build Houston -
npm run houston
to start all the processes.
Open up a browser and visit http://localhost:3000, and you should see the AppCenter Dashboard website. Congratulations!
Documentation is being moved to docs.elementary.io/develop/appcenter. Check there for the latest info.