Code Monkey home page Code Monkey logo

vsc-sap-hana-mta-dev-env-node14x's Introduction

Kick off your SAP HANA App Dev Env for running Hana-Cli (XSA & CF) by leverage VS Code Dev Container. Use this devcontainer for your projects if you want

Motivation

The approach of this project was to share the same required dev environment by using the same VS Code Dev Containers to make the start for new team members more easy and faster.

Prerequisites

Setting up this Dev Container - use WSL (Ubuntu)

Some features (docker, kubectl, etc.) were outsourced in a separately bash script, to increase the startup time for this devcontainer. If you need one of this features, you only need to comment or uncomment the relevant script.

1. Optional activate additional features at the end of the Dockerfile

Change the permission to executable with the chmod command.

node ➜ .../.devcontainer (main ✗) $  (docs ✗)
$ chmod -R +x

Additional features

Optional activate this additional VS Code extensions within devcontainer

    "ms-vscode-remote.remote-containers",
    "ms-vscode-remote.remote-ssh-edit",
    "ms-vscode-remote.remote-ssh",
    "ms-vscode-remote.remote-wsl",
    "ms-vscode-remote.vscode-remote-extensionpack",

2. Optional XS Client for SAP HANA XSA (Only required for connecting a XSA platform)

Download the XS_CLIENT00P_xxx-70001320 for Linux from SAP Download Center

Drop the unzipped XS_CLIENT00P file on root

XS Client

Change the path in your .devcontainer\Dockerfile

  • (ENV XSCLI="/workspaces/vsc-sap-hana-mta-dev-env-node14x/XS_CLIENT00P_134-70001320)

Change the permission by running your WSL - Distro with the chmod command.

node ➜ /workspaces/vsc-sap-hana-mta-dev-env-node14x/XS_CLIENT00P_134-70001320/bin (docs ✗)
$ chmod -R +x xs
node ➜ /workspaces/vsc-sap-hana-mta-dev-env-node14x/XS_CLIENT00P_134-70001320/sapjvm_8_jre/ (docs ✗)
$ chmod -R +x bin

After that you can build the Dev Container by clicking the Remote Status bar. Only for the first time the building of the Dev Container takes about 10 minutes, but then in no time!

Hints

Running project in WSL (Ubuntu)

  • For performance reason run the project in the Linux file system (~/home)
  • You'll find your Linux home directory on Windows here:
\\wsl$
\\wsl$\Ubuntu-20.04\home\
code --install-extension "christian-kohler.path-intellisense"
code --install-extension "christian-kohler.npm-intellisense"
...

This VS Dev Container includes

OS

  • OS Debian

CLIs

VS Code Extensions

  • A lot of nice extensions

NPMs for CAP & Fiori Dev

My tutorials with VS Code Dev Container

Microsoft - VS Code Dev Container

Nice blog "SAP CAP VS Code dev container" written by @htammen

HANA CLI by @jung-thomas

Contributing

  • Contribute or provide feedback for this repo
  • Consider to use Discussions
  • Search existing issues or report a problem

License

Copyright (c) 2021 Dirk Raschke. All rights reserved. This project is licensed under the MIT License.

vsc-sap-hana-mta-dev-env-node14x's People

Contributors

diraschk avatar draschke avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

vsc-sap-hana-mta-dev-env-node14x's Issues

push image: Get http://0.0.0.0:5000/v2/: dial tcp 0.0.0.0:5000: connect: connection refused

Tried to follow this tutorial: https://github.com/draschke/vsc-sap-hana-mta-dev-env-node14x/blob/5aa2886e7e3684059d162104e2e1e86502d61e4f/Tutorial/Run a CAP Application on Kyma.md

I wasn't able to push the image.

The push refers to repository [0.0.0.0:5000/cpapp]
Get http://0.0.0.0:5000/v2/: dial tcp 0.0.0.0:5000: connect: connection refused

`node ➜ /workspaces/vsc-sap-hana-mta-dev-env-node14x/cap-kyma-app (main ✗)
$ kubectl port-forward deployment/docker-registry 5000:5000 &
[1] 6219
node ➜ /workspaces/vsc-sap-hana-mta-dev-env-node14x/cap-kyma-app (main ✗)
$ Forwarding from 127.0.0.1:5000 -> 5000

new Terminal
node ➜ /workspaces/vsc-sap-hana-mta-dev-env-node14x/cap-kyma-app (main ✗)
$ docker tag cpapp 0.0.0.0:5000/cpapp

node ➜ /workspaces/vsc-sap-hana-mta-dev-env-node14x/cap-kyma-app (main ✗)
$ docker push 0.0.0.0:5000/cpapp

The push refers to repository [0.0.0.0:5000/cpapp]
Get http://0.0.0.0:5000/v2/: dial tcp 0.0.0.0:5000: connect: connection refused

exposed the "insecure-registries" : but didn't help me
$ cat ~/.docker/daemon.json
{
"insecure-registries" : [
"localhost:5000",
"127.0.0.1:5000"
],
"debug" : true,
"experimental" : true
}

https://stackoverflow.com/questions/51468491/how-kubectl-port-forward-works

node ➜ /workspaces/vsc-sap-hana-mta-dev-env-node14x/cap-kyma-app (main ✗)
$ Forwarding from 127.0.0.1:5000 -> 5000

Forwarding from [::1]:5000 -> 5000 --> miss this line in my output

Running xs in a Dev Container doesn't work

Running xs in Dev Container caused a Permission denied
node ➜ /workspaces/vscode-sap-hana-dev-env-for-running-hana-cli-2 (main ✗) $ xs
bash: /workspaces/vscode-sap-hana-dev-env-for-running-hana-cli-2/XS_CLIENT00P_134-70001320/bin/xs: Permission denied

Dev Container: - running xs doesn't works!*

node ➜ /workspaces/vscode-sap-hana-dev-env-for-running-hana-cli-2/XS_CLIENT00P_134-70001320/bin (main ✗) $ ls -lt
total 4
-rw-r--r-- 1 node node 1696 Jun  7 13:49 xs

node ➜ /workspaces/vscode-sap-hana-dev-env-for-running-hana-cli-2/XS_CLIENT00P_134-70001320 (main ✗) $ ls -lt
total 52
drwxr-xr-x 5 node node  4096 Aug  2 13:01 sapjvm_8_jre
drwxr-xr-x 3 node node  4096 Aug  2 13:01 jars
drwxr-xr-x 2 node node  4096 Aug  2 13:01 bin
-rw-r--r-- 1 node node 37245 Jun 17 11:08 SIGNATURE.SMF

WSL locally: - running xs works!

➜  bin git:(main) ✗ ls -lt
total 4
-rw-r--r-- 1 diraschk diraschk 1696 Jun  7 15:49 xs

➜  XS_CLIENT00P_134-70001320 git:(main) ✗ ls -lt
total 52
drwxr-xr-x 5 diraschk diraschk  4096 Aug  2 15:01 sapjvm_8_jre
drwxr-xr-x 3 diraschk diraschk  4096 Aug  2 15:01 jars
drwxr-xr-x 2 diraschk diraschk  4096 Aug  2 15:01 bin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.