Skip to main content

Generic Linux AzureCLI

Generic (distribution independant) way to install Azure CLI

Official documentation is: https://docs.microsoft.com/install-azure-cli-linux

Both install and update

curl -L https://aka.ms/InstallAzureCli | bash
Downloading Azure CLI install script from https://azurecliprod.blob.core.windows.net/install.py to /tmp/azure_cli_install_tmp_yl6EWO.
######################################################################## 100.0%
/tmp/azure_cli_install_tmp_yl6EWO: OK
Running install script.
-- Verifying Python version.
-- Python version 3.10.6 okay.
-- Verifying native dependencies.
-- Unable to verify native dependencies. dist=arch linux, version=None. Continuing...

===> In what directory would you like to place the install? (leave blank to use '/home/mihamina/lib/azure-cli'): 
-- '/home/mihamina/lib/azure-cli' is not empty and may contain a previous installation.

===> Remove this directory? (y/N): y

I choose "Yes" here, it's just my choice

Then we continue

===> Remove this directory? (y/N): y
-- Deleted '/home/mihamina/lib/azure-cli'.
-- Creating directory '/home/mihamina/lib/azure-cli'.
-- We will install at '/home/mihamina/lib/azure-cli'.

===> In what directory would you like to place the 'az' executable? (leave blank to use '/home/mihamina/bin'): 
-- The executable will be in '/home/mihamina/bin'.
-- Downloading virtualenv package from https://pypi.python.org/packages/source/v/virtualenv/virtualenv-16.7.11.tar.gz.
-- Downloaded virtualenv package to /tmp/tmpjq0ydq19/virtualenv-16.7.11.tar.gz.
-- Checksum of /tmp/tmpjq0ydq19/virtualenv-16.7.11.tar.gz OK.
-- Extracting '/tmp/tmpjq0ydq19/virtualenv-16.7.11.tar.gz' to '/tmp/tmpjq0ydq19'.
-- Executing: ['/usr/bin/python3', 'virtualenv.py', '--python', '/usr/bin/python3', '/home/mihamina/lib/azure-cli']
/tmp/tmpjq0ydq19/virtualenv-16.7.11/virtualenv.py:24: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  import distutils.spawn
/tmp/tmpjq0ydq19/virtualenv-16.7.11/virtualenv.py:25: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead
  import distutils.sysconfig
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/mihamina/lib/azure-cli/bin/python3
Also creating executable in /home/mihamina/lib/azure-cli/bin/python
Installing setuptools, pip, wheel...
done.
-- Executing: ['/home/mihamina/lib/azure-cli/bin/pip', 'install', '--cache-dir', '/tmp/tmpjq0ydq19', 'azure-cli', '--upgrade']
...
...
...
Building wheels for collected packages: antlr4-python3-runtime
  Building wheel for antlr4-python3-runtime (setup.py) ... done
  Created wheel for antlr4-python3-runtime: filename=antlr4_python3_runtime-4.9.3-py3-none-any.whl size=144554 sha256=9ff15dfb17ad07611a98dc4608988d0521f9262273cc342bb8b55d83227339ce
  Stored in directory: /tmp/tmpjq0ydq19/wheels/12/93/dd/1f6a127edc45659556564c5730f6d4e300888f4bca2d4c5a88
Successfully built antlr4-python3-runtime
Installing collected packages: ..., ..., ..., ..., ...
..., ..., ..., ..., ...
..., ..., ..., ..., ...
..., ..., ..., ..., ...
-- The executable is available at '/home/mihamina/bin/az'.
-- Created tab completion file at '/home/mihamina/lib/azure-cli/az.completion'

===> Modify profile to update your $PATH and enable shell/tab completion now? (Y/n): Y
===> Enter a path to an rc file to update (leave blank to use '/home/mihamina/.bashrc'): 
-- Backed up '/home/mihamina/.bash_profile' to '/home/mihamina/.bash_profile.backup'
-- Tab completion set up complete.
-- If tab completion is not activated, verify that '/home/mihamina/.bash_profile' is sourced by your shell.

Popular posts from this blog

npm run build base-href

Using NPM to specify base-href When building an Angular application, people usually use "ng" and pass arguments to that invocation. Typically, when wanting to hard code "base-href" in "index.html", one will issue: ng build --base-href='https://ngx.rktmb.org/foo' I used to build my angular apps through Bamboo or Jenkins and they have a "npm" plugin. I got the habit to build the application with "npm run build" before deploying it. But the development team once asked me to set the "--base-href='https://ngx.rktmb.org/foo'" parameter. npm run build --base-href='https://ngx.rktmb.org/foo did not set the base href in indext.html After looking for a while, I found https://github.com/angular/angular-cli/issues/13560 where it says: You need to use −− to pass arguments to npm scripts. This did the job! The command to issue is then: npm run build -- --base-href='https://ngx.rktmb.org/foo&

Jenkins invalid privatekey

Publish over SSH, Message "invalid privatekey:" With quite recent (June-July 2020) installations of Jenkins and OpenSSH, I have the following error message when using the "Deploy overs SSH" Jenkins plug-in and publishing artifacts to the target overs SSH: jenkins.plugins.publish_over.BapPublisherException: Failed to add SSH key. Message [invalid privatekey: [B@d8d395a] This problem seems to be referenced here: https://issues.jenkins-ci.org/browse/JENKINS-57495 Just regenerate a key with the right parameters To solve it: ssh-keygen -t rsa -b 4096 Or ssh-keygen -t rsa -b 4096 -m PEM

Emacs TypeScript Development

Emacs Configuration for Typescript In order to comfortably develop on Node, React or Angular projects with Emacs, TIDE is a good solution. We have TypeScript code highlight (that is the minimum!) and code completion based on the codebase (not only on locally defined and builtins) In order to achieve that: Install Emacs (24+) Install Node Install Typescript (which will provide "tsserver") Install TIDE and some usefull dependencies Configure Emacs to use all those Node is then installed in " /home/mihamina/Apps/node-v12.18.0-linux-x64/bin ": you should add it to your PATH. Installing Typescript is done with: npm install --save typescript @types/browserify After that, "tsserver" will be in " /home/mihamina/node_modules/.bin " Then comes the installation of TIDE: With the Emacs package manager, M-x package-install , install "tide". Do the same for "web-mode", "flycheck", "company" "js2-mode" and "