User Tools

Site Tools


Writing /app/www/public/data/meta/onboarding/ide_setup.meta failed
onboarding:ide_setup

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
onboarding:ide_setup [2018/04/26 12:48] – [Install DBDB] ccarewonboarding:ide_setup [2023/06/30 22:31] (current) – [Required Installs] - easy way to clone repo aryan
Line 1: Line 1:
 +====== Development Tools and IDE Setup ======
 +===== Required Installs =====
 +  * Intellij Idea - IDE Programming Client https://www.jetbrains.com/idea/
 +  * MySQL Workbench or other SQL querying tool - https://dev.mysql.com/downloads/workbench/
 +  * Slack - For day to day messaging / discussions - https://slack.com/downloads/osx
 +  * <del>Tunnelblick (if on Mac), get latest stable - https://tunnelblick.net/downloads.html</del>
 +  * OpenVPN - refer to [[https://drive.google.com/file/d/1r3hdOLvPhkdmXZ34e1-hTL-ajiNEw1Iv/view|OpenVPN Setup]]). **Requires username/password provisioning**
 +  * Password Safe (pwSafe) - password manager - may need to get a code for this from HR to buy on the App Store
 +  * Dropbox - for shared file management - https://www.dropbox.com/downloading
 +  * Microsoft Office - Links provided by HR
  
 +
 +===== Repo Download =====
 +  * All code stored in Bitbucket, and you may download each Repo as required or you can cheat with [[https://philipplies.medium.com/cloning-all-repositories-from-a-bitbucket-workspace-c614809bb378|Clone All Repos]]
 +    * pip install bucketcloner
 +    * run with `bucketcloner -u <your_username> -p <your_app_password> workspace`
 +    * username is got from your bitbucket settings - [[https://bitbucket.org/account/settings| UserSettings]]
 +    * app-password is created on [[https://bitbucket.org/account/settings/app-passwords/|app Passwords]]
 +
 +===== Optional Installs =====
 +  * iTerm 2 is a nice terminal alternative - https://www.iterm2.com/
 +
 +  * Spectacle for window resizing on Mac - https://www.spectacleapp.com/    or
 +  * Rectanble - https://rectangleapp.com/
 +
 +  * You favourite text editor, mine is sublime text 3 - https://www.sublimetext.com/3
 +  * Evernote for note taking - https://evernote.com/download
 +  * Postman if testing any APIs - https://www.getpostman.com/
 +  * Docker - https://store.docker.com/editions/community/docker-ce-desktop-mac
 +
 +===== Idea Groovy Editor Settings =====
 +  * 2 Tabs
 +  * Tabs as spaces
 +
 +To set the above: 
 +
 +Editor -> Code Style -> Groovy/JavaScript
 +    [untick] Use Tab Character
 +    Tab Size            : 2
 +    Indent              : 2
 +    Continuation Indent : 2  
 +    [untick] keep indent on empty lines
 +    
 +Editor -> General -> Auto Import
 +[tick] Optimize imports on the fly.
 +
 +**Shelve Items:**
 +
 +Shelving is temporarily storing pending changes you have not committed yet. This is useful, for example, if you need to switch to another high priority task and you want to set your changes aside to work on them later.
 +
 +**Usage**: 
 +Version Control Window -> Right click on required files -> Shelve
 +
 +Note: This is an alternative to git stash. Shelve can operate with either individual files or bunch of files, while Stash can only operate with a whole bunch of changed files at once.
 +
 +===== Company Header =====
 +Preferences- > Editor -> File and Code Templates
 +
 +<code>
 + /***************************************************************
 +  * Copyright (c) ${YEAR} Errigal Inc.
 +  *
 +  * This software is the confidential and proprietary information
 +  * of Errigal, Inc.  You shall not disclose such confidential
 +  * information and shall use it only in accordance with the
 +  * license agreement you entered into with Errigal.
 +  *
 +  ***************************************************************/
 + /**
 +  *
 +  * User: ${USER}
 +  * Date: ${DATE}
 +  */
 +</code>
 +
 +==== Enable IDEAJ CodeNarc Plugin ====
 +CodeNarc analyzes your code for defects, bad practices, inconsistencies, style issues and more.
 +
 +https://plugins.jetbrains.com/plugin/5925-codenarc
 +
 +===== Install DBDB =====
 +
 +if you don't have mysql installed then run the following command,
 +
 +  brew install mysql-client
 +
 +if you have MySQL installed, then stop MySQL and then install & use [[toolsandtechnologies:dbdb|DBDB]] which is our custom MySQL setup which allows you to seamlessly isolate and switch between customer schemas.
 +
 +dbdb uses it's own mysqld binary and all the databases and schemas will be stored in ~/.dbdb
 +
 +You could use Docker instead, but at the moment, Docker on Mac runs on a VM and our applications crawl due to high I/O.
 +
 +[[toolsandtechnologies:dbdb|More Details on DBDB]] 
 +
 +
 +===== Download Databases =====
 +NOTE, ensure all development transform scripts are run when starting an application on a database, WE DON'T WANT CUSTOMERS GETTING NOTIFIED ON DEV DATA
 +
 +Copy the backups via :
 +
 +  scp scotty@extdb2.ext:/backup/ticketer/ticketer.Sun.dump.gz ~/Downloads/
 +  scp scotty@extdb2.ext:/backup/snmp_manager/snmp_manager.Sun.dump.gz ~/Downloads/
 +  scp scotty@extdb2.ext:/backup/noc_portal/noc_portal.Sun.dump.gz ~/Downloads/
 +  scp scotty@extdb2.ext:/backup/reporting_manager/reporting_manager.Sun.dump.gz ~/Downloads/
 +  scp scotty@extdb2.ext:/backup/soap/soap.Sun.dump.gz ~/Downloads/
 +  scp scotty@extdb2.ext:/backup/fiber/fiber.Sun.dump.gz ~/Downloads/
 +  scp scotty@extdb2.ext:/backup/ebonding/ebonding.Sun.dump.gz ~/Downloads/
 +  scp scotty@extdb2.ext:/backup/content_distributor/content_distributor.Sun.dump.gz ~/Downloads/
 +
 +These backups are from Extenet
 +
 +
 +Note some of the small backups do not have any users you may need to get user info for them. The following query would need to be run on a QA or production DB server and the result then loaded in locally :
 +
 +  # Reporting Manager User Dump :
 +  mysqldump -ureader -p reporting_manager reporting_shiro_user reporting_shiro_role_permissions reporting_shiro_role reporting_shiro_user_reporting_shiro_role > user.dump
 +  
 +When importing the Database you may encounter issues such as the Database giving an error and saying it has gone away, to resolve this, go into a MySQL terminal and run :
 +
 +  set global max_allowed_packet = 1000000000;
 +  
 +Once done you can then try import the data :
 +
 +  mysql -uroot -p reporting_manager < reporting_manager.Sun.dump
 +
 +
 +===== SDKMan =====
 +To install SDKman run the following command :
 +
 +  curl -s "https://get.sdkman.io" | bash
 +
 +Once installed, open a new terminal, download appropriate Groovy, Grails and Java
 +
 +  sdk list java
 +  sdk list grails
 +  sdk list groovy
 +  
 +  sdk install java VERSION
 +  sdk install grails VERSION
 +  sdk install groovy VERSION
 +
 +NOTE, if you want to swap the current version of Groovy, Java etc being run in the terminal you can run
 +  sdk use PACKAGE VERSION
 +
 +e.g.
 +
 +  sdk use grails 2.5.6
 +==== IDEAJ Cheat sheet ====
 +  CMD+Shift+A       : Search for any command
 +  Press Shift Twice : Search Everywhere
 +  CMD+O             : go to class
 +  CMD+B             : go to declaration
 +  CTRL+T            : Refactor Menu Pop [Rename,Move,Safe delete etc]
 +  CMD+ALT+L         : Auto Indent Code
 +
 +
 +  CMD+K       : Commit project to VCS
 +  CMD+T       : Update project from VCS
 +  CMD+SHIFT+K : Push Commits
 +  CMD+D       : on the Change File to view Diff
 +
 +=== Want to quickly learn shortcuts? ===
 +use Cheatsheet: https://www.mediaatelier.com/CheatSheet/