Skip to content

Update install-tutorial.rst#259

Closed
oijn wants to merge 1 commit intobepasty:masterfrom
oijn:patch-2
Closed

Update install-tutorial.rst#259
oijn wants to merge 1 commit intobepasty:masterfrom
oijn:patch-2

Conversation

@oijn
Copy link
Copy Markdown

@oijn oijn commented Dec 20, 2020

Updated tutorial instructions for latest Debian+Python3.

Updated tutorial instructions.
@codecov-io
Copy link
Copy Markdown

codecov-io commented Dec 24, 2020

Codecov Report

Merging #259 (f39109f) into master (e74fdc3) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #259   +/-   ##
=======================================
  Coverage   71.38%   71.38%           
=======================================
  Files          44       44           
  Lines        2558     2558           
=======================================
  Hits         1826     1826           
  Misses        732      732           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e74fdc3...f39109f. Read the comment docs.

Comment on lines +60 to +63
# create trim alias
alias trim="awk '{\$1=\$1};1'"
# remove the top 11 lines + trim spaces at beginning of lines
trim src/bepasty/config.py | tail -n +11 > /home/bepasty/bepasty.conf
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please do not invent such tools for an install tutorial. just describe what needs to be done.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can agree to put the recipe in the Tips & Tricks instead?

SOCKFILE=$HOME/gunicorn.sock # we will communicate using this unix socket
PIDFILE=$HOME/gunicorn.pid
NUM_WORKERS=3 # how many worker processes should Gunicorn spawn
export PATH="/home/bepasty/.local/bin:$PATH" #include gunicorn path for exec
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

always have 2 spaces (at least) before and 1 space after #.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK - understood.

Comment on lines -88 to +118
server_name paste.example.org; # <-- add your domainname here
server_name bepasty.example.org; # <-- add your domainname here
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for wanting to mention bepasty, but paste or pastebin is the more well-known name for that kind of service.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs to be consistent throughout the tutorial. In the tutorial section that modifies /home/bepasty/bepasty.conf
SITENAME = 'bepasty.example.org'

Therefore, in my humble opinion - whatever is used pasty.example.org or bepasty.example.org has to be consistent so that those that are new to bepasty are not confused.

Comment on lines +159 to +161
tail /home/bepasty/logs/nginx-access.log
tail /home/bepasty/logs/nginx-error.log
tail /home/bepasty/logs/gunicorn_supervisor.log
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

never use tail to output logs to your console, that is dangerous. better: less +F filename

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK - point taken. Thanks for pointing this out.

Comment on lines +176 to +180
* The user secret in ``bepasty/config.py`` needs to be secure - an easy way
to create secure random character strings on the command line is:
``tr -dc A-Za-z0-9 </dev/urandom | head -c 10 ; echo ''``
this can also be used to create a long random secure SECRET_KEY value:
``tr -dc 'A-Za-z0-9!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' </dev/urandom | head -c 255 ; echo ''``
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use same command for both and just tell to use a longer secret for the SECRET_KEY.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The difference is that the first example only uses characters that can be typed on any language keyboard. The second uses almost the full list of the suggested characters for strong keys - of which may be difficult to enter on different keyboards.
I'm not against the idea and can modify as per your suggestion.

Comment on lines -10 to +14
apt-get install build-essential nginx supervisor python-dev git-core python-pip python-virtualenv
apt-get install nginx git-core python3-dev python3-pip virtualenv python3-virtualenv
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so, you did not need build-essential? is it installed on your base system already?

what's up with the supervisor stuff?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good spot regarding the missing supervisor.

On Debian 10 - no need for build-essential as anything that is required by the python/pip/etc.. packages are pulled in anyway.

I have now installed twice more to verify and I have confirmed that all you need is:
apt-get install git-core python3-dev python3-pip virtualenv python3-virtualenv nginx supervisor

@ThomasWaldmann
Copy link
Copy Markdown
Contributor

@oijn did you see my feedback?

@ThomasWaldmann
Copy link
Copy Markdown
Contributor

BTW, I'll make a 1.0 release soon, maybe we can get this PR merged before that.

@ThomasWaldmann ThomasWaldmann added this to the 1.0.0 milestone Jan 5, 2021
@oijn
Copy link
Copy Markdown
Author

oijn commented Jan 9, 2021

@oijn did you see my feedback?

Sorry - I was meaning to get back to this - have now just done so.

I have also re-run the tutorial two extra times and have changed the order of some points and modified some.

I have tried to make another pull request with the changes. Not sure if it worked?

[update] seems I've managed to create two pull requests. The latest one is the correct one.

@ThomasWaldmann
Copy link
Copy Markdown
Contributor

superseded by #264

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants