-
Notifications
You must be signed in to change notification settings - Fork 103
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
setup.rst: Add docs to setup corobo #665
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,95 @@ | ||||||||||||||
Setting Up Corobo | ||||||||||||||
================= | ||||||||||||||
|
||||||||||||||
The following documentation illustrates the process to | ||||||||||||||
install corobo and interface it with the Gitter | ||||||||||||||
(or any other backend) API. | ||||||||||||||
|
||||||||||||||
Installation | ||||||||||||||
------------ | ||||||||||||||
- To install corobo, first you need to install | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since these are all steps and not points, let's number them instead. |
||||||||||||||
python (version 3.6 or more) and set up a virtual environment. | ||||||||||||||
This can be done as follows: | ||||||||||||||
:: | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is incorrect, you should keep this at the end of the paragraph above. Github somehow renders this but I wasn't able to get this rendered properly locally. |
||||||||||||||
python3 -m venv env | ||||||||||||||
cd env | ||||||||||||||
source bin/activate ----> For Linux | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
\Scripts\activate ----> For Windows | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This could be a bit confusing, let's not specify instructions for windows or other OS. |
||||||||||||||
|
||||||||||||||
- Next, you can clone the corobo package via git and | ||||||||||||||
install the requirements (dependent packages). | ||||||||||||||
:: | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment as above. |
||||||||||||||
git clone https://github.com/coala/corobo.git | ||||||||||||||
cd corobo | ||||||||||||||
pip install -r requirements.txt | ||||||||||||||
|
||||||||||||||
Configuring the backend | ||||||||||||||
----------------------- | ||||||||||||||
|
||||||||||||||
- Clone the err-backend-gitter repository in your "corobo" folder. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think quotes are needed here.
Suggested change
|
||||||||||||||
:: | ||||||||||||||
pip3 install git+https://github.com/errbotio/\ | ||||||||||||||
err-backend-gitter@14a428bdd0597b473605264c822855da979bd916 | ||||||||||||||
Comment on lines
+31
to
+32
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not the way we install gitter backend. It is a part of the git submodules so the user just needs to |
||||||||||||||
|
||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Redundant new line? |
||||||||||||||
- To make the bot interact with the Gitter API, you need to login to | ||||||||||||||
Gitter using your GitHub, GitLab, Twitter, or any other available | ||||||||||||||
account. Remember, it is recommended to use a separate account | ||||||||||||||
(other than the admin account) for the bot. The bot will now use | ||||||||||||||
this account as its Gitter identity. | ||||||||||||||
|
||||||||||||||
- Also, you need to get your Gitter personal access token. It can be | ||||||||||||||
found by logging in `here <https://developer.gitter.im/apps>`_ with | ||||||||||||||
the above-created account. | ||||||||||||||
|
||||||||||||||
- To configure the bot with access to your | ||||||||||||||
`GitHub <https://docs.github.com/en/github \ | ||||||||||||||
/authenticating-to-github/creating-a-personal-access-token>`_ | ||||||||||||||
and `GitLab <https://docs.gitlab.com/ \ | ||||||||||||||
ee/user/profile/personal_access_tokens.html>`_ | ||||||||||||||
repositories, you will again need access tokens. | ||||||||||||||
The given hyperlinks would guide you with the process. | ||||||||||||||
|
||||||||||||||
- You can also create GitHub organizations and GitLab groups to | ||||||||||||||
manage your repositories. | ||||||||||||||
Under any organization, you can make teams to organize the workforce. | ||||||||||||||
|
||||||||||||||
- To configure the bot to join rooms, it must first | ||||||||||||||
manually enter those rooms via the bot Gitter account. Once this | ||||||||||||||
is done, the bot would automatically find these rooms (if mentioned | ||||||||||||||
in the ROOMS env variable) and establish a connection with them. | ||||||||||||||
|
||||||||||||||
- After completing the above steps, it is finally time to set up the | ||||||||||||||
environment variables with the above-gathered information. You | ||||||||||||||
can create a .env file with the following variables and source it | ||||||||||||||
before running the bot. | ||||||||||||||
:: | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment as above. |
||||||||||||||
BOT_PREFIX="any_name" ----> This will be used to address the bot | ||||||||||||||
along with any command | ||||||||||||||
BACKEND="Gitter" ----> Set the backend (other options are | ||||||||||||||
"Text","Zulip",etc.) | ||||||||||||||
Comment on lines
+66
to
+69
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This does not look good, also it's not required to specify the variables as they are self-explanatory.
Suggested change
|
||||||||||||||
BOT_TOKEN="your_gitter_token" | ||||||||||||||
GH_TOKEN="your_github_token" | ||||||||||||||
GL_TOKEN="your_gitlab_token" | ||||||||||||||
GH_ORG_NAME="your_github_organisation_name" | ||||||||||||||
GL_ORG_NAME="your_gitlab_organisation_name" | ||||||||||||||
ROOMS="rooms_to_join" | ||||||||||||||
BOT_ADMINS="your_gitter_username" | ||||||||||||||
(**Note:** The admin user account should be different than the | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a line above this. |
||||||||||||||
bot account.) | ||||||||||||||
|
||||||||||||||
- Hurrah!!! The bot is now ready to rock. To run the corobo instance, use: | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
:: | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment as above. |
||||||||||||||
errbot | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
(**Note:** You can use the --DEBUG flag to run the bot in debug mode.) | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a new line above this. |
||||||||||||||
|
||||||||||||||
Your corobo instance should now be running. You can chat with the bot by | ||||||||||||||
logging in through the admin Gitter account and searching it's username in | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
the conversations tab. | ||||||||||||||
You can send it commands via chat. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
:: | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment as above. |
||||||||||||||
bot_prefix help ----> Lists the set of commands available with the bot | ||||||||||||||
bot_prefix history ----> Lists the command history | ||||||||||||||
Comment on lines
+90
to
+91
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also not required.
Suggested change
|
||||||||||||||
|
||||||||||||||
To know more about the list of available commands and other features | ||||||||||||||
of corobo, check out the other | ||||||||||||||
`docs <https://github.com/coala/corobo/tree/master/docs>`_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.