-
Notifications
You must be signed in to change notification settings - Fork 17
Deploying Code
Bennett Petzold edited this page Oct 26, 2022
·
9 revisions
- Static IP: 192.168.2.6
- User: sw8
- Target IP: 192.168.2.5
Based on ROS connection method
- Set a static Ethernet IP of 192.168.2.X
- IP cannot be 192.168.2.5, this is the target's IP
- Windows instructions
- Linux instructions
- Max instructions
- Set the netmask
- Option 1: 255.255.255.0 subnet mask
- Option 2: [ip address]/24 CIDR
- Attach to target single board computer via Ethernet
- We use a network switch for multiple connections
- Creates a local network
- We use a network switch for multiple connections
- Prerequisite: Task 1
- Get a copy of ".sw8_ssh_identity"
- Put it in the "app" directory
- Ask the software lead for the file
- Use the deploy task
- Go to the project root
- Open in command processor (cmd/bash/zsh/etc)
- Linux/MacOS: ./gradlew deploy
- Windows: ./gradlew.bat deploy
- Prerequisite: Task 1
- The target address is 192.168.2.5
- Use SSH utility
- Linux/MacOS: use ssh directly
- ssh sw8@192.168.2.5
- For graphics: ssh -x sw8@192.168.2.5
- Windows: use terminal emulator
- e.g. MobaXTerm
- User: sw8
- Host: 192.168.2.5
- Port: 22
- Linux/MacOS: use ssh directly
- Ask for password
- Optional: add "sw8_ssh_identity" to your ssh agent
- Password not needed if an identity file is provided
- Ask the software lead for the file
- Prerequisite: Task 3
- Enter the ~/java directory
- cd ~/java
- Run app-all.jar
- java -jar app-all.jar
- Include flags after the java run
- java -jar app-all.jar [flags]
- e.g. java -jar app-all.jar --help
5: tmux
-
Online manual page
- If tmux is installed, can access with "man tmux"
- Our tmux sessions will be left on all defaults
- GNU screen users: that means CTRL-B, not CTRL-A
- Purpose of tmux
- tmux = Terminal Multiplexer
- Persistent terminal session when connection drops
- Multiple windows on one connection
- Generally great tool for terminal work
- Starting tmux
- To start a new tmux session: "tmux"
- To connect to a tmux session: "tmux a" or "tmux a [number]"
- List tmux sessions: "tmux ls"
- The tmux environment has a green bar at the bottom of the screen
- Start tmux sessions on the target, not your machine
- Don't nest tmux sessions
- basic tmux commands
- All commands start by typing CTRL-a, then the specific command
- Create new window: CTRL-a c
- Close window: CTRL-a &
- Close pane (works for one pane windows): CTRL-A x
- Go to window N: CTRL-a N
- e.g. for window 1, CTRL-a 1
- Detach: CTRL-a d
- Reattach with "tmux a"
- When session is over, do not use detach
- Use the "exit" command in bash
- CTRL-d (no CTRL-a first) also exits
- For more detail, see "DEFAULT KEY BINDINGS" in manual
- Can't connect to target device
- Make sure user is sw8
- sw8s is wrong
- Check password
- Confirm laptop settings
- Check against [Task 1](# 1: Setting Laptop Environment)
- Try ping 192.168.2.5
- Try a network scan
- sudo rfkill wlan (IMPORTANT)
- Disconnects from local WiFi
- sudo nmap -sn 192.168.2.0/24
- Scan that doesn't test ports
- sudo nmap 192.168.2.0/24
- Scan that tests ports
- Use if ping/fast scan succeeds but connection fails
- sudo rfkill wlan (IMPORTANT)
- Confirm next step with leadership
- Likely power cycling the Pi
- Make sure user is sw8
- The test phase failed
- You failed the tests
- Fix your code or fix the tests
- Can't run java/deployed app
- Test if java is on the system
- which java
- If not, install openjdk11
- Check default java version
- java --version
- If not Java 11, replace with Java 11
- Test if java is on the system
- Home
- Deploying Code
- Team Members Availability
- Architecture
- 2022
- September
- October
- 2022
- Comms
- UI