Tuesday, June 29, 2021
How to replace a string in file in Linux
Friday, June 25, 2021
Azure Agent - Configure As a Service Linux or Standalone or Nohup &
https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-linux?view=azure-devops
#Configure it as a linux process and using nohup &
./run.sh
ps -ef --sort=start_time |grep -E 'Agent|run.sh'
--------------------------------------------------------------------------------------------------------
#Configure Listener as a service in Linux, It actually, starts 3 Services
sudo ./svc.sh install #Creates a symlink under /etc/systemctl/system
sudo ./svc.sh start
sudo ./svc.sh status
sudo ./svc.sh uninstall #Uninstall Service(SystemD) ,You should stop before you uninstall.
ps -ef --sort=start_time |grep -E 'Agent|runsvc'
ps -ef --sort=start_time |grep -E 'vsts|Agent|run.sh'
sudo systemctl is-active 'vsts.agent.GenpactDigitalEngineering.eks\x2ddev.dev.service'
sudo systemctl is-enabled 'vsts.agent.GenpactDigitalEngineering.eks\x2ddev.dev.service'
sudo systemctl status 'vsts.agent.GenpactDigitalEngineering.eks\x2ddev.dev.service'
#Configure Listener as a service in Linux, It actually, starts 3 Services
Loaded: loaded (/etc/systemd/system/vsts.agent.GenpactDigitalEngineering.eks\x2ddev.dev.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2021-06-26 04:12:27 UTC; 17min ago
Main PID: 27333 (runsvc.sh)
Tasks: 21 (limit: 4915)
CGroup: /system.slice/vsts.agent.GenpactDigitalEngineering.eks\x2ddev.dev.service
├─27333 /bin/bash /home/eks/agent/runsvc.sh
├─27336 ./externals/node/bin/node ./bin/AgentService.js
└─27356 /home/eks/agent/bin/Agent.Listener run --startuptype service
Remove and re-configure an agent (Not Service) The Whole Agent
To remove the agent:
1) Stop and uninstall the service as explained above.
2) Remove the agent. [As it appears in Agent Pool]
./config.sh remove [Enter your credentials.]
After you've removed the agent, you can configure it again.
Thursday, June 24, 2021
AWS : S3API vs S3
aws s3api create-bucket --bucket my-bucket --region us-east-1
aws s3 mb s3://myeucentral1bucket --region eu-central-1
aws s3 sync s3://DOC-EXAMPLE-BUCKET-SOURCE s3://DOC-EXAMPLE-BUCKET-TARGET
--------------------------------------------------
aws s3api create-bucket --bucket cca-product-dev-s3bucket --region us-east-1 --acl public-read
aws s3 sync s3://cca-product-s3-bucket s3://cca-product-dev-s3bucket --dryrun
--------------------------------------------------
https://docs.aws.amazon.com/cli/latest/reference/s3api/create-bucket.html
https://aws.amazon.com/blogs/developer/leveraging-the-s3-and-s3api-commands/
https://aws.amazon.com/premiumsupport/knowledge-center/move-objects-s3-bucket/
https://stackoverflow.com/questions/27932345/downloading-folders-from-aws-s3-cp-or-sync
difference b/w Linux Operators : | || && & > >> ;
https://unix.stackexchange.com/questions/159489/is-there-a-difference-between-and-and
https://unix.stackexchange.com/questions/89386/what-is-symbol-and-in-unix-linux
> redirects output to a file, overwriting the file.
>> redirects output to a file appending the redirected output at the end
;
: commands separated by a;
are executed sequentially. The shell waits for each command to terminate in turn.&&
: command after&&
is executed if, and only if, command before&&
returns an exit status of zero. You can think of it asAND
operator.|
: a pipe. In expressioncommand1 | command2
The standard output of command1 is connected via a pipe to the standard input of command2.
There are more similar control operators, worth to mention:
||
: command after||
is executed if, and only if, command before||
returns a non-zero exit status. You can think of it asOR
operator. Please note, that|
and||
are completely different animals.&
: the shell executes the command terminated by&
in the background, does not wait for the command to finish and immediately returns exit code 0. Once again,&
has nothing to do with&&
.|&
: a shorthand for2>&1 |
i.e. both standard output and standard error of command1 are connected to command2's standard input through the pipe.
Additionally if you use zsh
then you can also start command with &|
or &!
. In this case job is immediately disowned, after startup it does not have a place in the job table.
Linux : Difference between >> and >
> redirects output to a file, overwriting the file.
>> redirects output to a file appending the redirected output at the end
https://unix.stackexchange.com/questions/89386/what-is-symbol-and-in-unix-linux
Azure - Pipeline - Add Approver for Stage
https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass
-
https://www.baeldung.com/spring-properties-file-outside-jar https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-featu...
-
https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass
-
The decision was made to block such external HTTP repositories by default https://stackoverflow.com/questions/66980047/maven-build-failure-d...