Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Mentat Test 3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
713
Mentat
Mentat Test 3
Commits
55845064
Commit
55845064
authored
3 years ago
by
Jan Mach
Browse files
Options
Downloads
Patches
Plain Diff
Updated Vagrant based development documentation to be more clear.
(Redmine issue:
#7041
)
parent
282793be
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+1
-1
1 addition, 1 deletion
Makefile
doc/sphinx/_doclib/development.rst
+13
-1
13 additions, 1 deletion
doc/sphinx/_doclib/development.rst
with
14 additions
and
2 deletions
Makefile
+
1
−
1
View file @
55845064
...
...
@@ -501,7 +501,7 @@ data-fetch-dbsnapshot: FORCE
data-import-dbsnapshot
:
FORCE
@
echo
"
\n
$(
GREEN
)
*** Importing latest production database dump ***
$(
NC
)
\n
"
@sudo
-u
postgres
pg_restore
--verbose
--format
=
d
--dbname
=
mentat_main ./data/devsnapshot/main
@sudo
-u
postgres
pg_restore
--verbose
--clean
--if-exists
--format
=
d
--dbname
=
mentat_main ./data/devsnapshot/main
@sudo
-u
postgres
psql
mentat_main
-c
"COPY reports_events ($(cat /vagrant/data/devsnapshot/main/reports_events.cols)) FROM stdin;"
<
./data/devsnapshot/chunks/reports_events.dat
@sudo
-u
postgres
psql
mentat_main
-c
"COPY statistics_events ($(cat /vagrant/data/devsnapshot/main/statistics_events.cols)) FROM stdin;"
<
./data/devsnapshot/chunks/statistics_events.dat
@sudo
-u
postgres
psql
mentat_main
-c
"COPY changelogs_items ($(cat /vagrant/data/devsnapshot/main/changelogs_items.cols)) FROM stdin;"
<
./data/devsnapshot/chunks/changelogs_items.dat
...
...
This diff is collapsed.
Click to expand it.
doc/sphinx/_doclib/development.rst
+
13
−
1
View file @
55845064
...
...
@@ -690,12 +690,24 @@ initial tips:
.. code-block:: shell
# Alias to quickly sudo su to mentat system user
sm # Stands for 'sudoSuMentat'
# Alias to quickly sudo su to vagrant system user
sv # Stands for 'sudoSuVagrant'
# Alias to quickly enter work directory:
wd # Stands for 'WorkDirectory'
# Alias to enable Python virtual environment:
ve # Stands for 'VirtualEnvironment'
Basically you should execute both of these aliases in succesion to end up with a prompt like this
The ``mentat`` user is the system user preconfigured to run Mentat. The ``vagrant`` user is a system user that owns
all project files. If you need to execute Mentat scripts and daemons, you should always switch to ``mentat``
user. If you need to work with the files and Vagrant box, you should always switch to ``vagrant`` user.
It is possible, that both of these user accounts will be merged in the future. However now the roles
are kept separate, because the usage of ``mentat`` user mimics the environment on production and ``vagrant`` user
is deeply baked into Vagrant and the change could be distruptive. By default by executing ``vagrant ssh``
command you will be connected as vagrant user.
Basically you should always execute ``ve`` alias to activate virtual environment and to end up with a prompt like this
and be ready to work:
.. code-block:: shell
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment