to Dockerfile: remove version from idea foldername (pros and cons to be discussed)
ln -s ${IDEA_HOME} /headless/idea-IC
Find out how to place a desktop item to the desktop for intellij
Start intellij on bootup of the container
Consider to make [email protected]:vocon-IT/intellij-desktop.git open source, so it can be used by our customers. In the moment, other cannot deploy the IntelliJ Desktop as described in the first chapter below
Improve the IntelliJ bash prompt to show the foldername and the git branch
Add .ssh to the list of mapped volumes
Add ssh-agent to .bashrc
Link /home/centos/.gitconfig to /headless/.gitconfig
allow docker and kubectl commands from inside the container (by mapping volumes to executables and .kube and .docker? )
save last used resolution and use as default for next bootup (read with xrandr and save to /home/centos/.vocloud?)
for development, create and use docker images with tags derived from the branch name (e.g. vocon/intellij-desktop:caas-53-whatever-branchname )
Adjust and test noVNC resolutions to minus 24 pixel height
Bug: if display is changed via Display Icon, then the .vocloud/.resolution.sh file is not updated, leading to a false resolution after next container reboot. To fix this, redefine the Display Desktop icon.
Bug: if display is changed via Application -> ... -> Display or context menu -> ... -> Display , then the .vocloud/.resolution.sh file is not updated, leading to a false resolution after next container reboot. To fix this, redefine the Display Desktop icon.
Bug: (workaround given) IntelliJ crashes, upon opening project oveits/docker-headless-vnc-container
Add IntelliJ Icon on the Desktop
Install jq on the container to be able to use the Hetzner Bash Scripts
Adapt the Idea Version and the Idea Path to be the same
On a machine with kubectl installed (e.g. the kubernetes master), run the following commands:
[ -d intellij-desktop ] || git clone [email protected]:vocon-IT/intellij-desktop.git
bash intellij-desktop/deploy.sh
On a machine with kubectl installed, define the necessary variables for running the job:
export CLOUDFLARE_API_TOKEN=changeme
export TARGET_ENVIRONMENT_DNS=changeToTargetDNSEntry
Then clone the project and run the job script:
[ -d intellij-desktop ] || git clone [email protected]:vocon-IT/intellij-desktop.git
bash intellij-desktop/deploy-via-kubectl.sh
Cut&Paste following code to the Kubernetes Node the IntelliJ Desktop will be running on:
IP=$(ifconfig eth0 | grep -v inet6 | grep inet | awk '{print $2}')
VNC_PASSWORD=$(cat deploy/intellijDesktopDeployment.yaml | grep passw | awk -F [\"] '{print $2}')
cat <<EOF > /tmp/8356823
Host: $IP
Port: 5901
Password: $VNC_PASSWORD
EOF
cat /tmp/8356823 && rm /tmp/8356823
Create a connection in a VNC viewer with the date printed above and connect to the machine.
Open a browser and head to following URL (change password in the URL, if you have not used a default password in the deployment file above.
echo "http://${IP}:6901/?password=${VNC_PASSWORD}/"
For HTTPS deployment, see the letsencrypt-issuer project:
If the Display icon is not available on the desktop, you might also find it via following path:
Then again:
bash ${IDEA_HOME}/bin/idea_wrapper.sh &
Note: kubectl and Docker is required for the rebuild step, so perform at least the rebuild step on the VM hosting the IntelliJDesktop container. the rebuild step requires kubectl, which is not yet available on IntelliJDesktop. The other steps can be perfomed on IntelliJDesktop for better editing, if needed.
ADD my-installation-script.sh $HOME/install
RUN bash $HOME/install/my-installation-script.sh && rm $HOME/install/my-installation-script.sh
USER 1000 line, if the installation must be done as root (and after the User 1000 line, if it needs to be installed as user)[ -r /my_icon.sh ] && bash /my_icon.sh && rm /my_icon.sh
# Create Desktop Launcher
cat << 'EOF' > /headless/Desktop/vscode.desktop
[Desktop Entry]
Version=1.0
Type=Application
Encoding=UTF-8
Exec=/usr/share/code/code --no-sandbox --unity-launch %F
Icon=com.visualstudio.code
StartupNotify=false
Categories=X-XFCE;X-Xfce-Toplevel;
OnlyShowIn=XFCE;
Name=Visual Studio Code
Comment=Code Editing. Redefined.
Path=
Terminal=false
EOF
chmod 777 /headless/Desktop/vscode.desktop
[ -d /usr/share/applications/ ] && cp /headless/Desktop/vscode.desktop /usr/share/applications/
<project-root>/deploy/deploy.yaml, add any needed volumes and ports, if needed. Note that you als need to add a mkdir -p /home/centos/.vocloud/<folder> statement to <project-root>/deploy.sh for a successful bootup of the POD in the rebuild.sh step.<project root>/entrypoint_post_vnc_startup.sh, search for Creating custom Application Menu and add a line
Menu>
<Name>Applications</Name>
...
<Layout>
<Filename>my-program.desktop</Filename>
..._icon.sh shell script.bash rebuild.sh
On a machine with kubectl connection to the kubernetes cluster (e.g. on the Kubernetes master), perform following command:
kubectl delete deploy intellij-desktop
Run in the local GIT repo intellij-desktop (confirm with y):
bash rebuild.sh
This will perform the following steps:
IMAGE=$(cat deploy/intellijDesktopDeployment.yaml | egrep "^[ ]*image:" | awk '{print $2}') \
&& sudo docker build -t ${IMAGE} . \
&& sudo docker push ${IMAGE} \
&& OLD_POD=$(kubectl get pod | awk '{print $1}' | grep intellij) \
&& bash deploy.sh \
&& kubectl delete POD $OLD_POD \
&& watch kubectl get pod
You can stop watching the outcome of the get pod command by pressing Ctrl-C.
Note: you need to wait for the POD to be up and running
kubectl exec -it $(kubectl get pod | grep Running | grep intellij-desktop | awk '{print $1}') bash
For changing the keyboard layout used on the machine, just change your own keyboard mapping by pressing Windows Key + Space.
Setting up an SSH Key on Bitbucket for authentication: Set up a SSH Key.
Docker command for running the latest container version with port mapping ('5091' - VNC and '6091' - HTML), volume mapping for persisting Intellij settings and Projects created inside the vocon folder.
docker run -it --rm -p 5901:5901 -p 6901:6901 \
-v ~/intellij/.Idea.share:/headless/.local/share/JetBrains \
-v ~/intellij/.Idea.java:/headless/.java \
-v ~/intellij/.Idea.maven:/headless/.m2 \
-v ~/intellij/.Idea:/headless/.IdeaIC \
-v ~/vocon:/headless/vocon \
gabrielnarodrigues/intellij-desktop:latest bash
You can use the docker run command specifying the environmnent variable VNC_RESOLUTION.
docker run -e VNC_RESOLUTION=3840x2120 gabrielnarodrigues/intellij-desktop:latest
Inside the '/entrypoint_post_vnc_startup.sh' file, look for the declaration of the String Array and add the wanted resolution. After the changes, the image needs to be rebuilt and the container started with the new version.
declare -a addResolutions=(
"1920 1056 60"
"2560 1416 60"
"2560 1440 60"
"3072 1704 60"
"3072 1728 60"
"3840 2136 60"
"3840 2160 60"
)
For retrieving user information about the used resolution of his PC, you can use the following commands:
screen.width + "x" + screen.height
window.screen.width * window.devicePixelRatio + "x" + window.screen.height * window.devicePixelRatio
For correct sizing when using the no-VNC version (browser), it's recommended to extract a minimum of 23 pixels (we have chosen 24 pixels) of the length of the resolution for better fitting inside the browser window. i.e.:
4k: 3840x2136
FHD: 1920x1056
Following https://spring.io/guides/gs/testing-web/
(was not mentioned on the guide, but I wanted to use Initializr from within IntelliJ)
--> IntelliJ --> File --> Settings --> Plugins --> Spring Assistant --> Install --> Reboot IDE
--> IntelliJ --> File --> New --> Project --> Spring Assistant -->
Content type
Image
Digest
Size
1.8 GB
Last updated
over 5 years ago
docker pull oveits/intellij-desktop:feature_CAAS-629-reconnect-to-existing-cloud-des