docs: removed mentions of Nix manager, replaced some occurences of legacy rccontrol mentions, reworked quickstart
This commit is contained in:
parent
9a46cbc018
commit
39e7b1fd72
4 changed files with 6 additions and 338 deletions
|
|
@ -147,10 +147,6 @@ Peer-to-peer Failover Support
|
|||
|
||||
* Yes
|
||||
|
||||
Additional Binaries
|
||||
-------------------
|
||||
|
||||
* Yes, see :ref:`rhodecode-nix-ref` for full details.
|
||||
|
||||
Remote Connectivity
|
||||
-------------------
|
||||
|
|
|
|||
|
|
@ -4,237 +4,7 @@
|
|||
Development setup
|
||||
===================
|
||||
|
||||
|
||||
RhodeCode Enterprise runs inside a Nix managed environment. This ensures build
|
||||
environment dependencies are correctly declared and installed during setup.
|
||||
It also enables atomic upgrades, rollbacks, and multiple instances of RhodeCode
|
||||
Enterprise running with isolation.
|
||||
|
||||
To set up RhodeCode Enterprise inside the Nix environment, use the following steps:
|
||||
|
||||
|
||||
|
||||
Setup Nix Package Manager
|
||||
-------------------------
|
||||
|
||||
To install the Nix Package Manager, please run::
|
||||
|
||||
$ curl https://releases.nixos.org/nix/nix-2.3.4/install | sh
|
||||
|
||||
or go to https://nixos.org/nix/ and follow the installation instructions.
|
||||
Once this is correctly set up on your system, you should be able to use the
|
||||
following commands:
|
||||
|
||||
* `nix-env`
|
||||
|
||||
* `nix-shell`
|
||||
|
||||
|
||||
.. tip::
|
||||
|
||||
Update your channels frequently by running ``nix-channel --update``.
|
||||
|
||||
.. note::
|
||||
|
||||
To uninstall nix run the following:
|
||||
|
||||
remove the . "$HOME/.nix-profile/etc/profile.d/nix.sh" line in your ~/.profile or ~/.bash_profile
|
||||
rm -rf $HOME/{.nix-channels,.nix-defexpr,.nix-profile,.config/nixpkgs}
|
||||
sudo rm -rf /nix
|
||||
|
||||
Switch nix to the latest STABLE channel
|
||||
---------------------------------------
|
||||
|
||||
run::
|
||||
|
||||
nix-channel --add https://nixos.org/channels/nixos-20.03 nixpkgs
|
||||
|
||||
Followed by::
|
||||
|
||||
nix-channel --update
|
||||
nix-env -i nix-2.3.4
|
||||
|
||||
|
||||
Install required binaries
|
||||
-------------------------
|
||||
|
||||
We need some handy tools first.
|
||||
|
||||
run::
|
||||
|
||||
nix-env -i nix-prefetch-hg
|
||||
nix-env -i nix-prefetch-git
|
||||
|
||||
|
||||
Speed up JS build by installing PhantomJS
|
||||
-----------------------------------------
|
||||
|
||||
PhantomJS will be downloaded each time nix-shell is invoked. To speed this by
|
||||
setting already downloaded version do this::
|
||||
|
||||
nix-env -i phantomjs-2.1.1
|
||||
|
||||
# and set nix bin path
|
||||
export PATH=$PATH:~/.nix-profile/bin
|
||||
|
||||
|
||||
Clone the required repositories
|
||||
-------------------------------
|
||||
|
||||
After Nix is set up, clone the RhodeCode Enterprise Community Edition and
|
||||
RhodeCode VCSServer repositories into the same directory.
|
||||
RhodeCode currently is using Mercurial Version Control System, please make sure
|
||||
you have it installed before continuing.
|
||||
|
||||
To obtain the required sources, use the following commands::
|
||||
|
||||
mkdir rhodecode-develop && cd rhodecode-develop
|
||||
hg clone -u default https://code.rhodecode.com/rhodecode-enterprise-ce
|
||||
hg clone -u default https://code.rhodecode.com/rhodecode-vcsserver
|
||||
|
||||
.. note::
|
||||
|
||||
If you cannot clone the repository, please contact us via support@rhodecode.com
|
||||
|
||||
|
||||
Install some required libraries
|
||||
-------------------------------
|
||||
|
||||
There are some required drivers and dev libraries that we need to install to
|
||||
test RhodeCode under different types of databases. For example in Ubuntu we
|
||||
need to install the following.
|
||||
|
||||
required libraries::
|
||||
|
||||
# svn related
|
||||
sudo apt-get install libapr1-dev libaprutil1-dev
|
||||
sudo apt-get install libsvn-dev
|
||||
# libcurl required too
|
||||
sudo apt-get install libcurl4-openssl-dev
|
||||
# mysql/pg server for development, optional
|
||||
sudo apt-get install mysql-server libmysqlclient-dev
|
||||
sudo apt-get install postgresql postgresql-contrib libpq-dev
|
||||
|
||||
|
||||
|
||||
Enter the Development Shell
|
||||
---------------------------
|
||||
|
||||
The final step is to start the development shells. To do this, run the
|
||||
following command from inside the cloned repository::
|
||||
|
||||
# first, the vcsserver
|
||||
cd ~/rhodecode-vcsserver
|
||||
nix-shell
|
||||
|
||||
# then enterprise sources
|
||||
cd ~/rhodecode-enterprise-ce
|
||||
nix-shell
|
||||
|
||||
.. note::
|
||||
|
||||
On the first run, this will take a while to download and optionally compile
|
||||
a few things. The following runs will be faster. The development shell works
|
||||
fine on both MacOS and Linux platforms.
|
||||
|
||||
|
||||
Create config.nix for development
|
||||
---------------------------------
|
||||
|
||||
In order to run proper tests and setup linking across projects, a config.nix
|
||||
file needs to be setup::
|
||||
|
||||
# create config
|
||||
mkdir -p ~/.nixpkgs
|
||||
touch ~/.nixpkgs/config.nix
|
||||
|
||||
# put the below content into the ~/.nixpkgs/config.nix file
|
||||
# adjusts, the path to where you cloned your repositories.
|
||||
|
||||
{
|
||||
rc = {
|
||||
sources = {
|
||||
rhodecode-vcsserver = "/home/dev/rhodecode-vcsserver";
|
||||
rhodecode-enterprise-ce = "/home/dev/rhodecode-enterprise-ce";
|
||||
rhodecode-enterprise-ee = "/home/dev/rhodecode-enterprise-ee";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
Creating a Development Configuration
|
||||
------------------------------------
|
||||
|
||||
To create a development environment for RhodeCode Enterprise,
|
||||
use the following steps:
|
||||
|
||||
1. Create a copy of vcsserver config:
|
||||
`cp ~/rhodecode-vcsserver/configs/development.ini ~/rhodecode-vcsserver/configs/dev.ini`
|
||||
2. Create a copy of rhodocode config:
|
||||
`cp ~/rhodecode-enterprise-ce/configs/development.ini ~/rhodecode-enterprise-ce/configs/dev.ini`
|
||||
3. Adjust the configuration settings to your needs if needed.
|
||||
|
||||
.. note::
|
||||
|
||||
It is recommended to use the name `dev.ini` since it's included in .hgignore file.
|
||||
|
||||
|
||||
Setup the Development Database
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
To create a development database, use the following example. This is a one
|
||||
time operation executed from the nix-shell of rhodecode-enterprise-ce sources ::
|
||||
|
||||
rc-setup-app dev.ini \
|
||||
--user=admin --password=secret \
|
||||
--email=admin@example.com \
|
||||
--repos=~/my_dev_repos
|
||||
|
||||
|
||||
Compile CSS and JavaScript
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
To use the application's frontend and prepare it for production deployment,
|
||||
you will need to compile the CSS and JavaScript with Grunt.
|
||||
This is easily done from within the nix-shell using the following command::
|
||||
|
||||
make web-build
|
||||
|
||||
When developing new features you will need to recompile following any
|
||||
changes made to the CSS or JavaScript files when developing the code::
|
||||
|
||||
grunt watch
|
||||
|
||||
This prepares the development (with comments/whitespace) versions of files.
|
||||
|
||||
Start the Development Servers
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
From the rhodecode-vcsserver directory, start the development server in another
|
||||
nix-shell, using the following command::
|
||||
|
||||
pserve configs/dev.ini
|
||||
|
||||
In the adjacent nix-shell which you created for your development server, you may
|
||||
now start CE with the following command::
|
||||
|
||||
|
||||
pserve --reload configs/dev.ini
|
||||
|
||||
.. note::
|
||||
|
||||
`--reload` flag will automatically reload the server when source file changes.
|
||||
|
||||
|
||||
Run the Environment Tests
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Please make sure that the tests are passing to verify that your environment is
|
||||
set up correctly. RhodeCode uses py.test to run tests.
|
||||
While your instance is running, start a new nix-shell and simply run
|
||||
``make test`` to run the basic test suite.
|
||||
|
||||
#TODO
|
||||
|
||||
Need Help?
|
||||
^^^^^^^^^^
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@ and commit files and |repos| while managing their security permissions.
|
|||
install/install-database
|
||||
install/install-steps
|
||||
admin/system-overview
|
||||
nix/default-env
|
||||
admin/system-admin
|
||||
admin/user-admin
|
||||
admin/repo-admin
|
||||
|
|
@ -80,9 +79,9 @@ and commit files and |repos| while managing their security permissions.
|
|||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: RhodeCode Control Documentation
|
||||
:caption: RhodeCode RCstack Documentation
|
||||
|
||||
RhodeCode Installer <https://docs.rhodecode.com/RhodeCode-Control/>
|
||||
RhodeCode RCstack Installer <https://docs.rhodecode.com/rcstack/>
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
|
|
|||
|
|
@ -3,108 +3,11 @@
|
|||
Quick Start Installation Guide
|
||||
==============================
|
||||
|
||||
.. important::
|
||||
Since version 5.0.0 Rhodecode runs in Docker, and to get |RCE| up and running,
|
||||
you need to use RCstack installer - <https://docs.rhodecode.com/rcstack/install/installation.html/>
|
||||
|
||||
These are quick start instructions. To optimize your |RCE|,
|
||||
|RCC|, and |RCT| usage, read the more detailed instructions in our guides.
|
||||
For detailed installation instructions, see
|
||||
:ref:`RhodeCode Control Documentation <control:rcc>`
|
||||
Please refer to RCstack documentation for
|
||||
|
||||
.. tip::
|
||||
|
||||
If using a non-SQLite database, install and configure the database, create
|
||||
a new user, and grant permissions. You will be prompted for this user's
|
||||
credentials during |RCE| installation. See the relevant database
|
||||
documentation for more details.
|
||||
|
||||
To get |RCE| up and running, run through the below steps:
|
||||
|
||||
1. Download the latest |RCC| installer from `rhodecode.com/download`_.
|
||||
If you don't have an account, sign up at `rhodecode.com/register`_.
|
||||
|
||||
2. Run the |RCC| installer and accept the End User Licence using the
|
||||
following example:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ chmod +x RhodeCode-installer-linux-*
|
||||
$ ./RhodeCode-installer-linux-*
|
||||
|
||||
Do you accept the RhodeCode Control license?
|
||||
Press [Y] to accept license and [V] to view license text: y
|
||||
|
||||
|
||||
.. important::
|
||||
|
||||
We recommend running RhodeCode as a non-root user, such as `rhodecode`;
|
||||
this user must have a proper home directory.
|
||||
Either log in as that user to install the software, or do it as root
|
||||
with `sudo -i -u rhodecode ./RhodeCode-installer-linux-*`
|
||||
|
||||
|
||||
3. Install a VCS Server, and configure it to start at boot.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ rccontrol install VCSServer
|
||||
|
||||
Agree to the licence agreement? [y/N]: y
|
||||
IP to start the server on [127.0.0.1]:
|
||||
Port for the server to start [10005]:
|
||||
Creating new instance: vcsserver-1
|
||||
Installing RhodeCode VCSServer
|
||||
Configuring RhodeCode VCS Server ...
|
||||
Supervisord state is: RUNNING
|
||||
Added process group vcsserver-1
|
||||
|
||||
|
||||
4. Install |RCEE| or |RCCE|. If using MySQL or PostgreSQL, during
|
||||
installation you'll be asked for your database credentials, so have them at hand.
|
||||
Mysql or Postgres needs to be running and a new database needs to be created.
|
||||
You don't need any credentials or to create a database for SQLite.
|
||||
|
||||
.. code-block:: bash
|
||||
:emphasize-lines: 11-16
|
||||
|
||||
$ rccontrol install Community
|
||||
|
||||
or
|
||||
|
||||
$ rccontrol install Enterprise
|
||||
|
||||
Username [admin]: username
|
||||
Password (min 6 chars):
|
||||
Repeat for confirmation:
|
||||
Email: your@mail.com
|
||||
Respositories location [/home/brian/repos]:
|
||||
IP to start the Enterprise server on [127.0.0.1]:
|
||||
Port for the Enterprise server to use [10004]:
|
||||
Database type - [s]qlite, [m]ysql, [p]ostresql:
|
||||
PostgreSQL selected
|
||||
Database host [127.0.0.1]:
|
||||
Database port [5432]:
|
||||
Database username: db-user-name
|
||||
Database password: somepassword
|
||||
Database name: example-db-name
|
||||
|
||||
5. Check the status of your installation. You |RCEE|/|RCCE| instance runs
|
||||
on the URL displayed in the status message.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ rccontrol status
|
||||
|
||||
- NAME: enterprise-1
|
||||
- STATUS: RUNNING
|
||||
- TYPE: Enterprise
|
||||
- VERSION: 4.1.0
|
||||
- URL: http://127.0.0.1:10003
|
||||
|
||||
- NAME: vcsserver-1
|
||||
- STATUS: RUNNING
|
||||
- TYPE: VCSServer
|
||||
- VERSION: 4.1.0
|
||||
- URL: http://127.0.0.1:10001
|
||||
|
||||
.. note::
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue