Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
ajmaradiaga
Developer Advocate
Developer Advocate
In this blog post I will cover how I setup a new laptop that I just received and the different tools/utilities that I install locally in order to get it ready for local development that I will be doing in the future.


Mac setup


Depending on the type of SAP development you do, the setup may vary. I’m including some generic tools, as well as tools specific for frontend, backend, mobile development. Feel free to share, in the comments section below, any additional tools that you think others will benefit from.

Basic setup


macOS 💻



  • Update macOS: Before installing anything we should update the operating system, for that go to System Preferences > Software Update.

  • Now that the OS is up to date, we open Terminal and proceed to install the Xcode Command Line tools. We can do this from the command-line interface (CLI).
    $ xcode-select --install



ℹ️   Keep Terminal open as we will use the command-line interface extensive to setup our environment

Brew 🍺


Brew is a package manager for macOS (and Linux). Instead of visiting many websites, downloading DMGs, tar.gz, We can automate some of these tedious work by using brew. Now, let’s start installing brew and then some basic utilities/programming languages. To install brew, still in Terminal, run the following command:
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"​

Once brew is installed, we can use it to install a number of utilities and apps from Terminal.

  • Utilities:
    $ brew install \
    bash \
    git \
    howdoi \
    jq \
    kubectl \
    kyma-cli \
    int128/kubelogin/kubelogin \
    nmap \
    node@16 \
    openjdk@11 \
    sqlite3 \
    tmux \
    tree \
    virtualenvwrapper

    A brief explanation of some of the utilities installed above...

    • bash: It is known that macOS ships an old version of bash. We can install a newer version using brew. We can also set this latest version as the default shell used by Terminal.

    • git: To keep track of changes in our code and sharing it with others. See Git - About Version Control.

    • howdoi: Sometime you might need a quick answer on how to use a command or a programming question, now you can search for the answer without the need of leaving Terminal.

    • jq: jq is a lightweight and flexible command-line JSON processor. I use it mainly when interacting with JSON data stored in files. If you want a deeper understanding on jq, I recommend checking out the Hands-on Dev series by dj.adams.sap, where he uses jq extensively.

    • kubectl and kyma-cli: Only required if you are using containers and deploying your applications to Kubernetes, e.g. if you want to deploy apps to the Kyma runtime in SAP Business Technology Platform (BTP).



      • int128/kubelogin/kubelogin: Plugin required to authenticate against the Kyma environment.




    • node: Important if we are developing apps following Cloud Application Programming (CAP) model.

    • openjdk: Java runtime required when doing any ABAP Development/BW modelling using Eclipse.

    • virtualenvwrapper: A wrapper around virtualenv, which is a tool for creating isolated virtual python environment. I do a lot of scripts using Python or functions that I deploy to Kyma and this tool comes very handy when dealing with different packages across Python projects.




 

  • Apps: To easily install some macOS applications, we can use Homebrew Cask. For example:
    $ brew install --cask \
    chromium \
    docker \
    firefox \
    postman \
    visual-studio-code

    A brief explanation of some of the applications installed above...

    • chromium: Unfortunately, there are many websites that only fully support Chromium based browsers. Therefore, it is always handy to have it installed in your laptop in case a website isn’t working properly and you need to test it in a Chromium based browser.

    • docker: Used to build and containerise our application. The cask will install docker desktop and it might have licensing implications
      ⚠️ When building container images in your M1, using the traditional docker build command, you need to know these images will be built on the arm architecture of your M1... meaning that the images will not run on a x86_64 processor. To create container images that run on multiple architectures you will need to use docker buildx command.
      $ docker buildx build --platform linux/amd64,linux/arm64 -t ajmaradiaga/s4-mock-server . --push​



    • firefox: Is the default browser that I use.

    • postman: Useful tool to explore APIs. In my case, I'm constantly interacting and getting familiar with different APIs, e.g. the APIs available in the SAP API Business  Hub.

    • visual-studio-code: A popular text editor with a rich extensions marketplace. SAP has released a number of extensions which can help speed-up the development of applications. I will cover some of this extensions below.




SAP Development Tools


In the SAP Development Tools website, you can find different tools available to SAP Developers. Lets explore some of the tools available through this website:

  • Eclipse: You'll need Eclipse if you are doing any development following the ABAP RESTful Application Programming Model (RAP) or modelling for SAP BW/4HANA/SAP BW   https://www.eclipse.org/downloads/download.php?file=/oomph/epp/2022-03/R/eclipse-inst-jre-mac64.dmg. If you have an M1 Mac, make sure to install the x86_64 version and not the AArch64 version, as the ABAP Development Tools (ADT) doesn't support this architecture yet.


  • Cloud: Here you will find a number of CLIs that are available to interact with different cloud services available via SAP BTP, e.g. Cloud Foundry CLI, BTP CLI, https://tools.hana.ondemand.com/#cloud

    • SAP BTP CLI: Download the CLI from https://tools.hana.ondemand.com/additional/btp-cli-darwin-amd64-latest.tar.gz and follow the steps below in Terminal.
      # Go to the folder where the file was downloaded 
      $ cd Downloads

      # Expand the .tar.gz file
      $ tar -xzf btp-cli-darwin-amd64-latest.tar.gz

      # Move the file to a different location, e.g. /opt
      $ mv darwin-amd64/ /opt/btp-cli

      # Add the executable to PATH and reload .bash_profile
      $ echo 'export PATH="/opt/btp-cli:$PATH"' >> /Users/[your_user_name]/.bash_profile
      $ source ~/.bash_profile

      # Login to BTP
      $ btp login --sso​





    • Cloud Foundry CLI: Interact with the Cloud Foundry environment available in SAP BTP.
      # Install CLI using brew
      $ brew install cloudfoundry/tap/cf-cli@8​


    • Cloud Application Programming model: Follow the instructions at https://cap.cloud.sap/docs/get-started/. If you installed the node and sqlite3 packages using brew, then all you are missing is @Sap/cds-dk, just run in Terminal
      $ npm i -g @sap/cds-dk​


    • Visual Studio Code: I installed Visual Studio Code using brew before. That said, there are a number of extensions available in the marketplace that will help/speed up your developments.

      • OData CSDL Modeler (SAPSE.vsc-extension-odata-csdl-modeler): Allows viewing OData metadata in a graphical manner

      • SAP CDS Language Support (SAPSE.vscode-cds): Language support for SAP CDS for Visual Studio Code.

      • SAP Fiori Tools - Extension Pack (SAPSE.sap-ux-fiori-tools-extension-pack): An extension pack that bundles SAP Fiori tools extensions. Required if doing any SAPUI5 development.

      • SAP HANA Database Explorer (SAPSE.hana-database-explorer): Access SAP HANA databases, browsing the database catalog, and executing SQL from a SQL console.

      • SQL Analyzer tool for SAP HANA (SAPSE.vsc-extension-sa): Analyze the performance of SAP HANA SQL queries.

        For a complete list of  the extensions published by SAP, visit https://marketplace.visualstudio.com/publishers/SAPSE.




    • HANA Client: The SAP HANA Client provides a set of drivers that developers can use to connect client applications to SAP HANA - https://tools.hana.ondemand.com/#hana. In my case I mainly use the HANA client from Python script or in a CAP project, so installing it using pip/npm will do.There is also a JDBC driver available, via Maven, which can be used in your Java projects.
      # Python
      $ pip install hdbcli​

      # Node.js
      $ npm install @sap/hana-client


    • Mobile development: In case you are doing any mobile apps using the SAP BTP iOS SDK https://tools.hana.ondemand.com/#mobile




Additional Tools:




  • SAP GUI for JAVA: The SAP GUI for the Java Environment (SAP GUI for Java) is a unified SAP front end running on Linux, macOS and Windows for connecting to Web Application Server ABAP (Web AS ABAP). You can download it from SAP Support.

  • Kyma: We installed previously the command line tool. If needed, we can be deploy locally for local development - https://kyma-project.io/docs/kyma/latest/04-operation-guides/operations/02-install-kyma/.
    # Provision a cluster locally
    $ kyma provision k3d

    # Deploy Kyma
    $ kyma deploy -p evaluation


  • Virtual Machine (VM): Unfortunately there is software that I use that only runs on Windows, e.g. the SAP Intelligent RPA agent required to test bots that are then deployed in SAP Process Automation. Having a Windows VM available allows me to run Windows only software on my Mac.


I’ve covered most of the steps that I carried out to setup my local environment. As mentioned before, depending on the type of SAP development you do, your setup may vary. It took me far longer than what I was expecting to setup my new laptop, which made me realise how easy and fast it is to spin up a cloud environment, like the SAP Business Application Studio, and once it is running, it will be ready with all the tools that I need to solve problems with code :-). Remember to share in the comments section any tools that you use on your personal setup, so that others can benefit from it.


Happy coding 👩‍💻👨‍💻!

14 Comments