MikroserverSetup: Difference between revisions

From ift
mNo edit summary
m (Removed full path references)
Line 4: Line 4:




'''''NB: This setup is for TSMC, but the commands can be tweaked to be used with IHP or AMS too.'''''
'''NB: This setup is for TSMC, but the commands can be tweaked to be used with IHP or AMS too.'''
 
 
The three mikroservers are :
* mikroserver1.klientdrift.uib.no
* mikroserver2.klientdrift.uib.no
* mikroserver3.klientdrift.uib.no


There are 4 mikroservers, mikroserver1-mikroserver4


== SSH key ==  
== SSH key ==  
Line 19: Line 14:
* Copy the key with your identity to your chosen mikroserver (mikroserver3 is chosen in this example). NB: Replace USERNAME with your user name
* Copy the key with your identity to your chosen mikroserver (mikroserver3 is chosen in this example). NB: Replace USERNAME with your user name


  ssh-copy-id USERNAME@mikroserver3.klientdrift.uib.no
  ssh-copy-id USERNAME@mikroserver3




Line 26: Line 21:
For ease of use set up aliases for the connections in your terminal. Open .bashrc in a text editor (vim / nano) and type in this  
For ease of use set up aliases for the connections in your terminal. Open .bashrc in a text editor (vim / nano) and type in this  


  alias mikroserver1='ssh -X USERNAME@mikroserver1.klientdrift.uib.no'
  alias mikroserver1='ssh -X USERNAME@mikroserver1'
  alias mikroserver2='ssh -X USERNAME@mikroserver2.klientdrift.uib.no'
  alias mikroserver2='ssh -X USERNAME@mikroserver2'
  alias mikroserver3='ssh -X USERNAME@mikroserver3.klientdrift.uib.no'
  alias mikroserver3='ssh -X USERNAME@mikroserver3'


Also create another alias for your favourite mikroserver  
Also create another alias for your favourite mikroserver  
  echo "alias mikroserver='ssh -X USERNAME@mikroserver3.klientdrift.uib.no'" >> ~/.bashrc
  echo "alias mikroserver='ssh -X USERNAME@mikroserver3'" >> ~/.bashrc




Line 45: Line 40:
== Commands to run virtuoso remotely ==  
== Commands to run virtuoso remotely ==  
Then finally on the computers in the lab (NOT connected to the mikroservers)
Then finally on the computers in the lab (NOT connected to the mikroservers)
  echo "alias virtuoso_tsmc="ssh -X USERNAME@mikroserver3.klientdrift.uib.no 'cd tsmc;virtuoso &'"" >> ~/.bashrc
  echo "alias virtuoso_tsmc="ssh -X USERNAME@mikroserver3 'cd tsmc;virtuoso &'"" >> ~/.bashrc
  echo "alias virtuoso_ihp="ssh -X USERNAME@mikroserver3.klientdrift.uib.no 'cd ihp/cds;virtuoso &'"" >> ~/.bashrc
  echo "alias virtuoso_ihp="ssh -X USERNAME@mikroserver3 'cd ihp/cds;virtuoso &'"" >> ~/.bashrc


The next time you open your terminal on your computer you can type  
The next time you open your terminal on your computer you can type  
Line 60: Line 55:


as server address type:
as server address type:
  sftp://mikroserver3.ift.uib.no/home/USERNAME
  sftp://mikroserver3/home/USERNAME
to add your homefolder on mikroserver as a folder on your local PC for easy access to your files (for example the [[Transistor_operating_point_printer]])
to add your homefolder on mikroserver as a folder on your local PC for easy access to your files (for example the [[Transistor_operating_point_printer]])
To store this connection, right click the "mikroserver3"-folder and click "Add Bookmark". The next time you just click the bookmark to open it.
To store this connection, right click the "mikroserver3"-folder and click "Add Bookmark". The next time you just click the bookmark to open it.
Line 67: Line 62:
If for some reason the above doesn’t work you can try this:
If for some reason the above doesn’t work you can try this:
* connect to your mikroserver (ssh mikroserver3)
* connect to your mikroserver (ssh mikroserver3)
* locate the file you want to copy. i.e /home/fredrik/picture.jpg
* locate the file you want to copy. i.e /home/USERNAME/picture.jpg
* type this command
* type this command
  scp picture.jpg USERNAME@login.uib.no:path/to/folder/to/copy/to
  scp picture.jpg USERNAME@login.uib.no:path/to/folder/to/copy/to
Line 79: Line 74:
* You have to be either connected to the UiB VPN or run the commands via the computers in the lab to be able to connect to microserver
* You have to be either connected to the UiB VPN or run the commands via the computers in the lab to be able to connect to microserver
* If you are using another shell like zsh or csh the aliases has to be in ~/.zshrc or  ~/.cshrc instead of ~/.bashrc
* If you are using another shell like zsh or csh the aliases has to be in ~/.zshrc or  ~/.cshrc instead of ~/.bashrc
* Make sure you have replaced all the instances of USERNAME with your usename, i.e "fli091"
* Make sure you have replaced all the instances of USERNAME with your usename, i.e "abc0123"




[[Category:Mikroelektronikk]]
[[Category:Mikroelektronikk]]

Revision as of 07:54, 30 March 2020

Set-up of connection to mikroservers and cadence virtuoso

This set-up will allow you to connect to the mikroservers and/or start Cadence virtuoso with one command without typing any password or host-names.


NB: This setup is for TSMC, but the commands can be tweaked to be used with IHP or AMS too.

There are 4 mikroservers, mikroserver1-mikroserver4

SSH key

  • Generate an ssh-key
ssh-keygen -f ~/.ssh/id.rsa -t rsa -N  
  • Copy the key with your identity to your chosen mikroserver (mikroserver3 is chosen in this example). NB: Replace USERNAME with your user name
ssh-copy-id USERNAME@mikroserver3


Connection aliases

For ease of use set up aliases for the connections in your terminal. Open .bashrc in a text editor (vim / nano) and type in this

alias mikroserver1='ssh -X USERNAME@mikroserver1'
alias mikroserver2='ssh -X USERNAME@mikroserver2'
alias mikroserver3='ssh -X USERNAME@mikroserver3'

Also create another alias for your favourite mikroserver

echo "alias mikroserver='ssh -X USERNAME@mikroserver3'" >> ~/.bashrc


Automatic sourcing

Source scripts inside .bashrc. This will make sure the scripts are loaded every time you log in, so you don't have to do it manually

# TSMC setup
echo "source /eda/cadence/2018-19/scripts/analog.sh" >> ~/.bashrc
echo "source /eda/cadence/eda_general_init.sh" >> ~/.bashrc
# IHP setup
echo "source ~/ihp/cds/sh.cadence" >> ~/.bashrc

Commands to run virtuoso remotely

Then finally on the computers in the lab (NOT connected to the mikroservers)

echo "alias virtuoso_tsmc="ssh -X USERNAME@mikroserver3 'cd tsmc;virtuoso &'"" >> ~/.bashrc
echo "alias virtuoso_ihp="ssh -X USERNAME@mikroserver3 'cd ihp/cds;virtuoso &'"" >> ~/.bashrc

The next time you open your terminal on your computer you can type

virtuoso_tsmc

to start Cadence Virtuoso, or

mikroserver

to connect to mikroserver3 without any hassle!

Add mikroserver as a folder on your pc

Open up your home folder in linux and in the bottom left corner click "Connect to Server" as shown in this picture:

ConnectToServer.png

as server address type:

sftp://mikroserver3/home/USERNAME

to add your homefolder on mikroserver as a folder on your local PC for easy access to your files (for example the Transistor_operating_point_printer) To store this connection, right click the "mikroserver3"-folder and click "Add Bookmark". The next time you just click the bookmark to open it.

Alternative way using scp/secure copy

If for some reason the above doesn’t work you can try this:

  • connect to your mikroserver (ssh mikroserver3)
  • locate the file you want to copy. i.e /home/USERNAME/picture.jpg
  • type this command
scp picture.jpg USERNAME@login.uib.no:path/to/folder/to/copy/to
  • this will copy the file to your home folder on any UiB machine
  • To copy a folder
scp -r NameOfFolder USERNAME@login.uib.no:path/to/folder/to/copy/to

Troubleshooting

  • Make sure you copy your ID (ssh-copy-id) to the correct mikroserver
  • Make sure you have restarted your terminal (or source ~/.bashrc) if the commands doesn't work
  • You have to be either connected to the UiB VPN or run the commands via the computers in the lab to be able to connect to microserver
  • If you are using another shell like zsh or csh the aliases has to be in ~/.zshrc or ~/.cshrc instead of ~/.bashrc
  • Make sure you have replaced all the instances of USERNAME with your usename, i.e "abc0123"