diff --git a/pages/blog/20200610-githubandroidstudiowindows.md b/pages/blog/20200610-githubandroidstudiowindows.md index bc78fa811..988c476f8 100644 --- a/pages/blog/20200610-githubandroidstudiowindows.md +++ b/pages/blog/20200610-githubandroidstudiowindows.md @@ -1,82 +1,82 @@ -# How To Setup Github to work with Android Studio on a Windows Machine - -Created on 10, June 2020 • [ali18997](https://github.com/ali18997) - ---- - -This blog is about how to setup [GitHub](https://github.com/) while working on [Android Studio](https://en.wikipedia.org/wiki/Android_Studio) for the [treehouses remote](https://github.com/treehouses/remote) repository using a Windows Machine. -To follow the steps here you should have Android Studio setup properly as per the [How To Setup Android Studio](./20200110-androidstudiosetup.md) blog post. - ---- - -## Download GitHub Desktop App - -1. GitHub Desktop is available for the Windows platform. **Download** it [here](https://desktop.github.com/) - -2. Install GitHub Desktop by running the installer and wait for it to finish installation - -3. Click **Sign into Github.com** on the welcome screen and sign in with your GitHub account - -![](./images/20200610-github-welcome.png) - ---- - -## Setting up the treehouses remote repository - -1. Click **Repository** on the Menu bar and click **Repository settings** in the list. - -![](./images/20200610-github-repo-setting.png) - -2. Select **Remote** and enter **https://github.com/treehouses/remote.git** as the URL and click **Save**. - -![](./images/20200610-remote-link.png) - ---- - -## Importing the project in Android Studio - -1\. Open Android Studio - -![](./images/20200610-android-studio-start.png) - -2\. Click **Import Project (Gradle, Eclipse ADT, etc.)** - -3\. Navigate to where the GitHub Desktop stored the remote repository locally. By default its in the `GitHub\remote` directory inside your Documents folder. Select the remote folder with Android icon and click **OK** - -![](./images/20200610-android-studio-import.png) - ---- - -## Making Changes and Pull Requests - -1\. By Default you would be on the Master branch, so you should make a new branch to make your changes. Give it a name and click **New Branch** - -![](./images/20200610-branch.png) - -2\. Click **Create branch** - -![](./images/20200610-branch2.png) - -3\. Your Android Studio project will automatically be switched to this new branch. Make the changes and when you come back they will automatically be detected by GitHub Desktop. Give your commit a description and click **Commit to "your branch name"** - -![](./images/20200610-commit.png) - -4\. Click **Publish Branch** - -![](./images/20200610-publish.png) - -5\. Click **Create Pull Request** - -![](./images/20200610-create-pr.png) - -6\. It will open it on a browser where you can complete the Pull Request - ---- - -## Testing Pull Requests of Others: -1. Select the Pull Request you want to test in GitHub Desktop. Click on it and wait for it to fetch that branch. Once it is done, Android Studio will automatically be configured to work on that branch and you can build/run the code to test the pull request. - -![](./images/20200610-pr.png) - - ---- +# How To Setup Github to work with Android Studio on a Windows Machine + +Created on 10, June 2020 • [ali18997](https://github.com/ali18997) + +--- + +This blog is about how to setup [GitHub](https://github.com/) while working on [Android Studio](https://en.wikipedia.org/wiki/Android_Studio) for the [treehouses remote](https://github.com/treehouses/remote) repository using a Windows Machine. +To follow the steps here you should have Android Studio setup properly as per the [How To Setup Android Studio](./20200110-androidstudiosetup.md) blog post. + +--- + +## Download GitHub Desktop App + +1. GitHub Desktop is available for the Windows platform. **Download** it [here](https://desktop.github.com/) + +2. Install GitHub Desktop by running the installer and wait for it to finish installation + +3. Click **Sign into Github.com** on the welcome screen and sign in with your GitHub account + +![](./images/20200610-github-welcome.png) + +--- + +## Setting up the treehouses remote repository + +1. Click **Repository** on the Menu bar and click **Repository settings** in the list. + +![](./images/20200610-github-repo-setting.png) + +2. Select **Remote** and enter **https://github.com/treehouses/remote.git** as the URL and click **Save**. + +![](./images/20200610-remote-link.png) + +--- + +## Importing the project in Android Studio + +1\. Open Android Studio + +![](./images/20200610-android-studio-start.png) + +2\. Click **Import Project (Gradle, Eclipse ADT, etc.)** + +3\. Navigate to where the GitHub Desktop stored the remote repository locally. By default its in the `GitHub\remote` directory inside your Documents folder. Select the remote folder with Android icon and click **OK** + +![](./images/20200610-android-studio-import.png) + +--- + +## Making Changes and Pull Requests + +1\. By Default you would be on the Master branch, so you should make a new branch to make your changes. Give it a name and click **New Branch** + +![](./images/20200610-branch.png) + +2\. Click **Create branch** + +![](./images/20200610-branch2.png) + +3\. Your Android Studio project will automatically be switched to this new branch. Make the changes and when you come back they will automatically be detected by GitHub Desktop. Give your commit a description and click **Commit to "your branch name"** + +![](./images/20200610-commit.png) + +4\. Click **Publish Branch** + +![](./images/20200610-publish.png) + +5\. Click **Create Pull Request** + +![](./images/20200610-create-pr.png) + +6\. It will open it on a browser where you can complete the Pull Request + +--- + +## Testing Pull Requests of Others: +1. Select the Pull Request you want to test in GitHub Desktop. Click on it and wait for it to fetch that branch. Once it is done, Android Studio will automatically be configured to work on that branch and you can build/run the code to test the pull request. + +![](./images/20200610-pr.png) + + +--- diff --git a/pages/blog/20200820-tutor.md b/pages/blog/20200820-tutor.md new file mode 100644 index 000000000..87ef60cc4 --- /dev/null +++ b/pages/blog/20200820-tutor.md @@ -0,0 +1,173 @@ +# How to install OpenEdx by tutor + +Created on 20, Aug 2020 • [hiroTochigi](https://github.com/hiroTochigi) + +--- + +This blog is about how to install OpenEdx by [Tutor(rpi)](https://github.com/ole-vi/tutor-rpi) on Tor network. Tutor(rpi) is forked from [Tutor](https://github.com/overhangio/tutor) and customized to run on Raspberry pi 4. + +[Tutor](https://github.com/overhangio/tutor) is a docker-based [Open edX](https://openedx.org/) distribution, both for production and local development. The goal of Tutor is to make it easy to deploy, customize, upgrade and scale Open edX. Tutor is reliable, fast, extensible, and it is already used by dozens of Open edX platforms around the world. + +--- + +### [Prerequisite](https://openedx.atlassian.net/wiki/spaces/OpenOPS/pages/146440579/Native+Open+edX+platform+Ubuntu+16.04+64+bit+Installation) +* Raspberry Pi 4 with 8GB RAM +* 32GB or more storage + +--- + +## Setting up Environment in Raspberry Pi for OpenEdx + +1. Enter Raspberry Pi via non-root +`pi` is a default user for treehouses image. +Tutor gives you a warning message if you run it as root. +Also, it might prevent OpenEdx from connecting to MariaDB in some point. +Strongly recommend to run Tutor as non-root. + +1. Delete all Docker containers and Docker images +Treehouses starts Planet in default. +They might hinder Tutor from installing OpenEdx, so you should delete them. + +1. Make Sure Tor is Configured +Tutor asks hosting address to host OpenEdx. +In this tutorial, we host OpenEdx on Tor network with port 80. +Verify Tor is configured and port 80 is opened by the below command. +``` +sudo treehouses tor list +``` +You should get `80 <=> 80` on your screen. +If you get `external <=> local` but not `80 <=> 80`, port 80 is not opened +Open port 80 by the below command. +``` +sudo treehouses tor add 80 +``` +When even you do not get `external <=> local`, Tor is not configured yet. +Execute the below command. +``` +sudo treehouses tor add 80 +sudo treehouses tor start +``` +If you get message like below, Tor is properly configured. + +![](images/20200820-verify-port-opened.png) + +**Note: ** If you boot up your image first time, you should reboot it again. +Without rebooting, your stoarage might not be enough to install OpenEdx. + +--- + +## Install Tutor + +1. Download Tutor Binary Data +You can download Tutor by a below command. +``` +wget https://github.com/ole-vi/tutor/releases/download/v10.0.10-rpi/tutor +``` +This command should download Tutor in your current directory. + +1. Make Tutor Executable +You can make Tutor executable by below command. +``` +sudo chmod +x tutor +``` +Witihout making executable, you cannot use Tutor. + +1. Move Tutor in `usr/local/bin/` +You should move Tutor in `/usr/local/bin/` by a below command. +``` +sudo mv tutor /usr/local/bin +``` + +1. Make Sure Tutor Installed Correctly +Type `tutor --help`. +You should get the below picture with a proper configuration. + + +![](images/20200820-successful-tutor-conf.png) + + +**note: ** There are several directories named `bin`. +Tutor should be stored in `/usr/local/bin` because Tutor is a normal user programs not managed by the distribution package manager. +Please look at [this page](https://unix.stackexchange.com/questions/8656/usr-bin-vs-usr-local-bin-on-linux/8663) for more precise information. + +--- + +## Start OpenEdx + +1\. Copy Your Onion Addfress +Your Onion Address is used for the configuration +Type the below command. +``` +sudo treehouses tor +``` +You should get the Onion Address like the below picture. + +![](images/20200820-get-onion-address.png) + +2\. Start Tutor +Type the below command. +``` +tutor local quickstart +``` +At first, Tutor starts interactive platform configuration. +Answer yes for the above questioin because OpenEdx is on your Onion Address. + +![](images/20200820-tutor-interactive-mode.png) + +3\. Configuration + +* LMS Configuration +Paste your Onion Addrress. + +![](images/20200820-lms-conf.png) + +* CMS Configuration +Type "studio." and then paste your Onion Address + +![](images/20200820-cms-conf.png) + +* Platform Name +Default + +* Public Email Address +If you actually use OpenEdx, you should configure your actual email address. Otherwise, default email address is fine. + +* Language Code +Default + +* HTTPS access +No + +After all setting, you should get the similar display like the below picture + +![](images/20200820-complete-configuration.png) + +After that, Tutor starts to build containers and start services. +It takes 4 - 10 minutes to start OpemEdx. +If you get the below message, open Tor browser and go to the URL + +![](images/20200820-start-openedx.png) + +You can get the below pages + +* LMS + +![](images/20200820-lms.png) + +* CMS + +![](images/20200820-cms.png) + +## Advance Commands + +1. Install Demo Course + +``` +tutor local importdemocourse +``` + +1. Create an User with Admin Right + +``` +tutor local createuser --staff --superuser yourusername user@email.com +``` \ No newline at end of file diff --git a/pages/blog/images/20200820-cms-conf.png b/pages/blog/images/20200820-cms-conf.png new file mode 100644 index 000000000..acf99d85f Binary files /dev/null and b/pages/blog/images/20200820-cms-conf.png differ diff --git a/pages/blog/images/20200820-cms.png b/pages/blog/images/20200820-cms.png new file mode 100644 index 000000000..3df78a284 Binary files /dev/null and b/pages/blog/images/20200820-cms.png differ diff --git a/pages/blog/images/20200820-complete-configuration.png b/pages/blog/images/20200820-complete-configuration.png new file mode 100644 index 000000000..0c7d84624 Binary files /dev/null and b/pages/blog/images/20200820-complete-configuration.png differ diff --git a/pages/blog/images/20200820-get-onion-address.png b/pages/blog/images/20200820-get-onion-address.png new file mode 100644 index 000000000..dc39df9bc Binary files /dev/null and b/pages/blog/images/20200820-get-onion-address.png differ diff --git a/pages/blog/images/20200820-lms-conf.png b/pages/blog/images/20200820-lms-conf.png new file mode 100644 index 000000000..2e36aa73f Binary files /dev/null and b/pages/blog/images/20200820-lms-conf.png differ diff --git a/pages/blog/images/20200820-lms.png b/pages/blog/images/20200820-lms.png new file mode 100644 index 000000000..15925c92a Binary files /dev/null and b/pages/blog/images/20200820-lms.png differ diff --git a/pages/blog/images/20200820-start-openedx.png b/pages/blog/images/20200820-start-openedx.png new file mode 100644 index 000000000..40b8f4860 Binary files /dev/null and b/pages/blog/images/20200820-start-openedx.png differ diff --git a/pages/blog/images/20200820-successful-tutor-conf.png b/pages/blog/images/20200820-successful-tutor-conf.png new file mode 100644 index 000000000..e65dd474e Binary files /dev/null and b/pages/blog/images/20200820-successful-tutor-conf.png differ diff --git a/pages/blog/images/20200820-tutor-interactive-mode.png b/pages/blog/images/20200820-tutor-interactive-mode.png new file mode 100644 index 000000000..8991c4d21 Binary files /dev/null and b/pages/blog/images/20200820-tutor-interactive-mode.png differ diff --git a/pages/blog/images/20200820-verify-port-opened.png b/pages/blog/images/20200820-verify-port-opened.png new file mode 100644 index 000000000..c64bfaf74 Binary files /dev/null and b/pages/blog/images/20200820-verify-port-opened.png differ diff --git a/pages/blog/list.md b/pages/blog/list.md index dc7291df4..3a3e5f409 100644 --- a/pages/blog/list.md +++ b/pages/blog/list.md @@ -1,5 +1,7 @@ ## Blogs +[How to install OpenEdx by Tutor](20200820-tutor.md) on Aug 20 2020 by hiroTochigi `(How to install OpenEdx by Tutor)` + [How To Setup Github to work with Android Studio on a Windows Machine](20200610-githubandroidstudiowindows.md) on June 10, 2020 by ali18997 `(GitHub Configure with Windows for Android Studio for treehouses remote)` [Set up headless treehouses node](20200217-headlessrpi.md) on Feb 17, 2020 by An Pham `(Headless node deploy)`