Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tutor (fixes #732) #733

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
164 changes: 82 additions & 82 deletions pages/blog/20200610-githubandroidstudiowindows.md
Original file line number Diff line number Diff line change
@@ -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)


---
173 changes: 173 additions & 0 deletions pages/blog/20200820-tutor.md
Original file line number Diff line number Diff line change
@@ -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 [email protected]
```
Binary file added pages/blog/images/20200820-cms-conf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pages/blog/images/20200820-cms.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pages/blog/images/20200820-get-onion-address.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pages/blog/images/20200820-lms-conf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pages/blog/images/20200820-lms.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pages/blog/images/20200820-start-openedx.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pages/blog/images/20200820-verify-port-opened.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions pages/blog/list.md
Original file line number Diff line number Diff line change
@@ -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)`
Expand Down