UCSF-CBI / c4

The C4 Website
https://ucsf-cbi.github.io/c4/
1 stars 2 forks source link

Prompt for examples #24

Closed HenrikBengtsson closed 3 years ago

HenrikBengtsson commented 3 years ago

For example, in https://github.com/UCSF-CBI/c4/blob/master/docs/software/singularity.md, use:

[alice@{{ site.devel.name }} ~]$ 

where the hostname is configured globally, rather than using a hardcoded hostname as-is:

[alice@c4-dev3 ~]$ 

Also, make sure to use a prompt, often the full prompt where we illustrate an actual run on a devel node with output, etc. For example, there's now

cat singularity_test_1657.log
/c4/home/alice
c4-n2
Tue Dec 22 13:18:39 PST 2020
[1] 55

Those calls need to be prefixed with [alice@{{ site.devel.name }} ~]$.

BTW, the folder might be different from the one (~) I used above.

HenrikBengtsson commented 3 years ago

I've updated make check-usernames to detect hardcoded prompts. It now reports on the following cases:

./howto/log-in-without-pwd.md:102:[alice@c4-log1.ucsf.edu ~]$ cd .ssh
./howto/log-in-without-pwd.md:103:[alice@c4-log1.ucsf.edu .ssh]$ cat laptop_to_c4.pub >> authorized_keys
./howto/log-in-without-pwd.md:107:[alice@c4-log1.ucsf.edu .ssh]$ chmod u=rw,go= ~/.ssh/authorized_keys
./howto/log-in-without-pwd.md:108:[alice@c4-log1.ucsf.edu .ssh]$ stat --format=%A ~/.ssh/authorized_keys
./howto/log-in-without-pwd.md:113:[alice@c4-log1.ucsf.edu .ssh]$ exit
./howto/log-in-without-pwd.md:125:[alice@c4-log1.ucsf.edu ~]$ 
./howto/log-in-without-pwd.md:138:[alice@c4-log1.ucsf.edu ~]$ 
./howto/log-in-without-pwd.md:154:[alice@c4-log1.ucsf.edu ~]$ 
./software/singularity.md:179:[alice@c4-dev3 ~]$ cat sing_r_base.bash 

These should be using one of:

hgputnam commented 3 years ago

Think we got them all, make check-usernames is clean...

HenrikBengtsson commented 3 years ago

Perfect. But you'll I'll try my best to find more things 😛

HenrikBengtsson commented 3 years ago

There are examples on https://ucsf-cbi.github.io/c4/software/singularity.html that totally lacks a prompt