IPCC Tools Document
what is git:
Git is a version control system (VCS) originally created by Linus Torvalds in 2005
Git is a free and open source distributed version control system.
What is a version control system (VCS)?
A VCS keeps track of the contributions of the developers working as a team on the projects. They maintain the history of code changes done and with project evolution, it gives an upper hand to the developers to introduce new code, fixes bugs, and run tests with confidence that their previously working copy could be restored at any moment in case things go wrong.
What is a git repository?
A repository is a file structure where git stores all the project-based files. Git can either stores the files on the local or the remote repository
What does git clone do
The command creates a copy (or clone) of an existing git repository. Generally, it is used to get a copy of the remote repository to the local repository.
What does the command git config do?
The git config command is a convenient way to set configuration options for defining the behavior of the repository, user information and preferences, git installation-based configurations, and many such things.
What is a conflict?
Git usually handles feature merges automatically but sometimes while working in a team environment, there might be cases of conflicts such as:
1. When two separate branches have changes to the same line in a file
2. A file is deleted in one branch but has been modified in the other.
These conflicts have to be solved manually after discussion with the team as git will not be able to predict what and whose changes have to be given precedence.
what is the difference between git and github
1.git is a distributed version control system installed on local machines which allow developers to keep track of commit histories and supports collaborative work.
where github is cloudbased source code repository develope by using git
2.git is maintain by LINUX foundation
github is acquired by Microsoft
3.SVN, Mercurial, etc are the competitors are the compititors of git
GitLab, Atlassian BitBucket, etc are the competitors of github
what is the function of Git pull and git push command
git pull is one of many commands that claim the responsibility of ‘syncing’ remote content. The git remote command is used to specify what remote endpoints the syncing commands will operate on.
The git push command is used to upload content to a remote repository. The git fetch command can be confused with git pull .
what is jenkins:
{
Jenkins is an open-source automation server that helps automate various aspects of software development, such as building, testing, and deploying code. It allows developers to set up continuous integration and continuous delivery (CI/CD) pipelines, streamlining the development and release process.
How can I install jenkins:
You can install Jenkins by following these general steps
1.You can visit the jenkins official website :JENKINS.IO:
2.Access Jenkins through your web browser, typically at?http://localhost:8080.
How to create a new jenkins job :
1.Log in to Jenkins and click on “New Item.”
2.Enter a name for your job and choose the appropriate job type (freestyle project or pipeline).
3.Configure the job’s settings, such as source code repository, build triggers, and build steps.
4.Save your configuration, and Jenkins will start running your job based on the defined settings.
What is jenkins file
A Jenkinsfile is a text file that contains the pipeline definition for a Jenkins job. It is written in Groovy and resides in the version control repository alongside the source code. Using Jenkinsfiles allows the entire CI/CD pipeline to be versioned, enabling easy collaboration and maintaining consistency.
What is jenkins job:
A Job/Project is the fundamental unit of a logical work (like a software build, an automation task, test execution, etc) using the Jenkins automation server and other required plugins, configurations & infrastructures.
Jobs can be of different types like – a freestyle project, a multi-configuration project, a pipeline project, a multi-branch project, etc.
What are the jenkins pipeline:
Jenkins Pipelines can be either – a Declarative pipeline or a Scripted Pipeline. Declarative pipeline makes use of numerous, generic, predefined build steps/stages (i.e. code snippets) to build our job according to our build/automation needs whereas, with Scripted pipelines, the steps/stages can be custom-defined & used using a groovy syntax which provides better control & fine-tuned execution levels.
What are the important plugin in jenkins:
Below are the important plugin in jenkins:
Maven 2
Gits
Amazon EC2
Join
Copy artifact
Green Balls
HTML Publisher
What is meant by jenkins pipeline:
A pipeline is a group of interlinked jobs done one after the other in a sequence. To integrate and implement continuous delivery pipelines, Jenkins pipelines provides a combination of plugins. The instructions to be performed are given throuexpgh code.
Explian continious intregation :
In software development, when multiple developers or teams are working on different segments of same web application, we need to perform integration test by integrating all modules. In order to do that an automated process for each piece of code is performed on daily bases so that all your code get tested.
What is contionious deployment:
Continuous deployment (CD, or CDE) is a strategy or methodology for software releases where any new code update or change made through the rigorous automated test process is deployed directly into the live production environment, where it will be visible to customers
What is jenkins master node :
The Jenkins master?acts to schedule the jobs, assign slaves, and send builds to slaves to execute the jobs. It will also monitor the slave state (offline or online) and get back the build result responses from slaves and the display build results on the console output.
What is jenkins slave node :
Slave?is a java executable which receives the build instructions from the central master node.
ANSIBLE
what is ansible:
Ansible is a configuration management system. It is used to set up and manage infrastructure and applications. It allows users to deploy and update applications using SSH without the need to install an agent on a remote system.
What is the use of Ansible
Ansible is used for managing IT infrastructure and deploying software apps to remote nodes. Ansible allows you to deploy an application to many nodes with one single command. However, for this, we need some programming knowledge to understand the Ansible scripts.
What are the features of ansible:
Ansible has many strengths, which include the following:
?It is agentless and only requires the SSH service running on the target machines.
?Python is the only required dependency, and, fortunately, most systems have Python pre-installed.
?It requires minimal resources, so there is low overhead.
?It is easy to learn and understand since Ansible tasks are written in YAML.
?Unlike other tools, most of which are procedural, Ansible is declarative; it defines the desired state and fulfills the requirements needed to achieve it.
What is ansible galaxy :
Ansible can communicate with configured clients from the command line by using the Ansible command. It also allows you to automate configuration by using the Ansible-playbook command. To create the base directory structure, you can use a tool bundled with Ansible, known as Ansible Galaxy.
What is configuration management :
Configuration Management (CM) is a practice that we should follow to keep track of all updates that are going into the system over a period of time. This also helps in a situation where a major bug has been introduced to the system due to some new changes that need to be fixed with minimum downtime. CM keeps track of all updates that are needed in a system and ensures that the current design and build state of the system are up-to-date and properly functional.
What are the requirement of ansible server:
If you are a Windows user, then you need to have a virtual machine on which Linux should be installed. Ansible Server requires Python 2.6 version or higher. If these requirements are fulfilled, then you can proceed with ease.
What is playbook:
A playbook has a series of YAML-based files that send commands to remote computers via scripts. Developers can configure completely complex environments by passing a script to the required systems rather than using individual commands to configure computers from the command line remotely. Playbooks are one of Ansible’s strongest selling points and are often referred to as Ansible’s building blocks.
What are ad hoc commands? Give an example.
Ad hoc commands are simple, one-line commands used to perform a certain task. You can think of ad hoc commands as an alternative to writing playbooks
Command: ansible host -m netscaler -a “nsc_host=nsc.example.com user=apiuser password=apipass”
What is a YAML file and how do we use it in Ansible?
YAML files are like any formatted text file, with a few sets of rules similar to those of JSON or XML. Ansible uses this syntax for playbooks as it is more readable than other formats.
What is Ansible-doc
Ansible-doc displays information on modules installed in Ansible libraries. It displays a listing of plug-ins and their short descriptions, provides a printout of their documentation strings, and creates a short snippet that can be pasted into a playbook.
AWS SECRETE MANAGER :
What is AWS Secrets Manager and what are its main features?
AWS Secrets Manager is a service that helps you protect access to your applications, services, and IT resources without upfront investment or on-going maintenance costs. Its main features include:
- Secure and manage secrets, such as database credentials, API keys, and OAuth tokens
- Automatically rotate secrets without requiring code changes
- Control access to secrets using fine-grained policies
- Audit secret access for compliance and security purposes
- Integrate with other AWS services
How does AWS Secrets Manager protect sensitive information
AWS Secrets Manager encrypts secrets at rest using AWS Key Management Service (KMS) keys. The encrypted secrets are stored in a highly available, redundant, and durable infrastructure. Access to the secrets is controlled by AWS Identity and Access Management (IAM) policies, ensuring that only authorized users and applications can access the secrets
What is secret rotation and why is it important
Secret rotation is the process of periodically changing a secret, such as a password or API key, to reduce the risk of unauthorized access. Regularly rotating secrets helps to protect sensitive information by minimizing the impact of compromised secrets and reducing the opportunity for attackers to use them.
How do you control access to secrets in AWS Secrets Manager
Access to secrets in AWS Secrets Manager is controlled by IAM policies. You can create policies to grant or deny access to specific secrets or secret versions, and you can specify which actions (e.g., GetSecretValue, PutSecretValue) are allowed. Additionally, you can use resource-based policies to control cross-account access to secrets.
What is the difference between a secret and a parameter in AWS Systems Manager Parameter Store?
While both AWS Secrets Manager and AWS Systems Manager Parameter Store can be used to store sensitive information, they have different use cases and features. Secrets Manager is specifically designed for storing and managing secrets, like API keys and database credentials, and provides features like automatic secret rotation and audit logging. Parameter Store, on the other hand, is designed for storing and managing configuration data, such as environment variables or runtime parameters, and does not provide secret rotation capabilities
LAMDA Document:
What is AWS LAMDA
Aws Lambda, a popular service offered by Amazon, allows users to run code without the need for any programming languages.
What are the languages supported by AWS Lambda
The languages supported by AWS Lambda are as follows:
- Java
- Python
- js
- C#
- Ruby
- Go
- PowerShell
What is automated deployment
While automated deployment is similar to programming in other languages, it cuts down on a lot of the associated challenges. It also cuts down on all human interference; this, in turn, helps organizations ensure quality-based outcomes that are best in every parameter. As one becomes more proficient in it, deployment of the pipeline can easily be created.
What is auto-scaling in Lambda
It is one of the features of AWS that helps one to automatically configure and spin new instances. One of the best things about AWS auto-scaling is that it does not require any interference at any stage. However, users can monitor everything through metrics and thresholds. To enable this task, one needs to cross a threshold, and without interference, one can see the instances scaled horizontally.
What is your understanding of AMI
AMI is Amazon Machine Image; it provides the information required to launch an instance. One can also launch multiple instances using AMI when there are multiple vendors.
What are the limitations of AWS Lambda
Some of the limitations of AWS Lambda are mentioned below:
- The default deployment package size is 50 MB.
- The ephemeral disk space is limited to 512 MB, as the Lambda function will take a longer time to execute with a larger package size.
- The execution time is longer when memory allocation is lower.
- The memory range is between 128 and 10,240 MB.
- The maximum execution timeout for a function is 15 minutes.
How is a Lambda function executed
A Lambda function can be directly invoked by the Lambda console, Lambda API, AWS SDK, AWS CLI, and AWS toolkits.
In how many ways can AWS Lambda be used
One can use Lambda in the following ways:
- As an event-driven computing service, AWS Lambda runs code in response to events.
- These events can be the changes to data in an Amazon S3 bucket or AWS DynamoDB.
- Lambda can run code in response to HTTP requests using the Amazon API Gateway or API calls made using AWS SDKs.
- Java
- Python
- js
- C#
- Ruby
- Go
- PowerShell
What is automated deployment
While automated deployment is similar to programming in other languages, it cuts down on a lot of the associated challenges. It also cuts down on all human interference; this, in turn, helps organizations ensure quality-based outcomes that are best in every parameter. As one becomes more proficient in it, deployment of the pipeline can easily be created.
What is auto-scaling in Lambda
It is one of the features of AWS that helps one to automatically configure and spin new instances. One of the best things about AWS auto-scaling is that it does not require any interference at any stage. However, users can monitor everything through metrics and thresholds. To enable this task, one needs to cross a threshold, and without interference, one can see the instances scaled horizontally.
What is your understanding of AMI
AMI is Amazon Machine Image; it provides the information required to launch an instance. One can also launch multiple instances using AMI when there are multiple vendors.
What are the limitations of AWS Lambda
Some of the limitations of AWS Lambda are mentioned below:
- The default deployment package size is 50 MB.
- The ephemeral disk space is limited to 512 MB, as the Lambda function will take a longer time to execute with a larger package size.
- The execution time is longer when memory allocation is lower.
- The memory range is between 128 and 10,240 MB.
- The maximum execution timeout for a function is 15 minutes.
How is a Lambda function executed
A Lambda function can be directly invoked by the Lambda console, Lambda API, AWS SDK, AWS CLI, and AWS toolkits.
In how many ways can AWS Lambda be used
One can use Lambda in the following ways:
- As an event-driven computing service, AWS Lambda runs code in response to events.
- These events can be the changes to data in an Amazon S3 bucket or AWS DynamoDB.
- Lambda can run code in response to HTTP requests using the Amazon API Gateway or API calls made using AWS SDKs.
Jenkins Installation Procedure
Jenkins Server
To install Java 17 & create symlinks
sudo yum install -y java-17-amazon-corretto-devel
java -version
file $(which java)
file /etc/alternatives/java
To display the value of the PATH environment variable
echo $PATH
JAVA_HOME=/usr/lib/jvm/java-17-amazon-corretto.x86_64
PATH=$PATH:$JAVA_HOME/bin
export JAVA_HOME
source .bashrc
echo $PATH
To add Jenkins repo
sudo wget -O /etc/yum.repos.d/jenkins.repo \
https://pkg.jenkins.io/redhat-stable/jenkins.repo
To Import a key file from Jenkins-CI to enable installation from the package
sudo rpm –import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key
To install Jenkins in EC2 instance
sudo yum upgrade -y
sudo yum install jenkins -y
To start Jenkins service
sudo systemctl status jenkins
sudo systemctl start jenkins –> #Wait for 20-30 seconds while the service gets started sudo systemctl enable jenkins
sudo systemctl enable jenkins
curl ifconfig.io
Now open the Jenkins UI in browser using the link: http://:8080
https://www.youtube.com/watch?v=MVoI8Qv5tFU
https://www.youtube.com/watch?v=rtHFdhCm434
https://sipjs.com/guides/server-configuration/asterisk/
Asrerisk Installation procedure
1. Introduction
The Verizon Proactive Monitoring Automated Synthetic Call Testing (PASCT) Asterisk installation is a two-step process (compilation and deployment). A dedicated compilation server instance in AWS has been created for use retrieving the source code and performing the compilation. The compilation server is deployed as part of the development environment. The installation to the PASCT development and production AWS servers for the IP Contact Center will be performed via script built by SOE per the requirements defined in this document. Rehydration of these servers is required every 90 days.
The purpose of this document is for the Application team to build, install & configure the Asterisk application on AW environment.
2. Compile Asterisk on AWS Linux
In the current phase the compilation of the application and building of the tar file is a manual process.
2.1. AWS Linux Version
This version is determined by AWS EC2 and will change in future.
The current compilation server has following OS version:
[root@ohlvipcts001ip tempuser]# hostnamectl
Static hostname: ohlvipcts001ip.oh.dev.ipc.aws.tpd-soe.net
Icon name: computer-vm
Chassis: vm
Machine ID: 5865cda4a2da4d3cbb921d77d291d2c2
Boot ID: 7568272dcedf412a8551e62884780c24
Virtualization: xen
Operating System: Amazon Linux 2
CPE OS Name: cpe:2.3:o:amazon:amazon_linux:2
Kernel: Linux 5.4.254-169.358.amzn2.x86_64
Architecture: x86-64
2.2. Asterisk Version
The Version of Asterisk for the current deployment: asterisk-20.4.0
Asterisk is open source and must be retrieved from the internet. The command to get the latest version (LTS) of Asterisk is:-
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20-current.tar.gz
It may be possible that the above command may download a different version (other than asterisk-20.4.0) based on the latest LTS release from Asterisk.
If internet connectivity is not available, wget will fail.
Important: Internet connectivity is required for build server
2.3. Install the prerequisite packages
The Asterisk tar file contains the details of the prerequisite for the compilation. The tar can be unzipped using the following command :-
- tar -xvf asterisk-20-current.tar.gz
The list of packages which needs to be installed is extracted as defined in the file (/asterisk-20.4.0/contrib/scripts/install_prereq) . All of the packages & addons marked for RedHat are selected. The following command is used for installing the pre-requisite RPM needed for the building Asterisk.
yum install –skip-broken –assumeyes gcc make gcc gcc-c++ pkgconfig libedit-devel jansson-devel libuuid-devel sqlite-devel libxml2-devel speex=devel speexdsp-devel libogg-devel libvorbis-devel alsa-lib-devel portaudio-devel libcurl-devel xmlstarlet bison flex 110 postsql-dev postgresql-dev postgresql-devel unixODBC-devel neon-devel gmime-devel lua-devel uriparser-devel libxslt-devel openssl-devel mysql-devel bluez-libs-devel radcli-devel freetds-devel jack-audio-connection-kit jack-audio-connection-kit-devel bash libcap-devel net-snmp-devel iksemel-devel corosynclib-devel newt-devel popt-devel libical-devel spandsp-devel libresample-devel uw-imap-devel binutils-devel libsrtp-devel gsm-devel doxygen graphviz zlib-devel openldap-devel codec2-devel hoard fftw-devel unbound-devel wget subversion bzip2 patch xmlstarlet libjansson jansson-devel
2.4 Configure and make install
Run the configure command as root with option with-pjproject-bundled; this is defined in the install_prereq script. With-jansson-bundled option is also included as the version of required jansson_devel package cannot be installed on the AWS instance.
- cd asterisk-20.4.0
- sudo su
- ./configure –prefix=/apps/asterisk –with-pjproject-bundled –with-jansson-bundled
Run the menuselect (GUI) to select the option. Select the default options and save it.
- Make menuselect
Run the following commands to complete the installation.
- make
- make install
- make basic-pbx
- make install-logrotate
The above command will create the Asterisk installer in the /apps/asterisk/ folder. The structure of the folder is: –
Create a tar file that will be used to deploy the Asterisk server. The command to create the tar file is :-
tar -cvf /apps/asterisk.tar /apps/asterisk/
2.5 Verification of Asterisk build
Run the following command to run the asterisk in foreground mode and check for errors.
- /apps/asterisk/sbin/asterisk -vvvvvvvgc
It will return messages followed by Asterisk status and the new prompt.
Loading bridge_softmix.so.
== Registered bridge technology softmix
== bridge_softmix.so => (Multi-party software based channel mixing)
Loading chan_bridge_media.so.
== Registered channel type ‘Announcer’ (Bridge Media Announcing Channel Driver)
== Registered channel type ‘Recorder’ (Bridge Media Recording Channel Driver)
== chan_bridge_media.so => (Bridge Media Channel Driver)
Loading codec_gsm.so.
== Registered translator ‘gsmtolin’ from codec gsm to slin, table cost, 900000, computational cost 460
== Registered translator ‘lintogsm’ from codec slin to gsm, table cost, 600000, computational cost 814
== codec_gsm.so => (GSM Coder/Decoder)
Loading codec_resample.so.
== Registered translator ‘slin 8000khz -> 12000khz’ from codec slin to slin, table cost, 800000, computational cost 999999
Loading codec_g722.so.
== Registered translator ‘g722tolin’ from codec g722 to slin, table cost, 960000, computational cost 249
== Registered translator ‘lintog722’ from codec slin to g722, table cost, 825000, computational cost 573
== Registered translator ‘g722tolin16’ from codec g722 to slin, table cost, 900000, computational cost 612
== Registered translator ‘lin16tog722’ from codec slin to g722, table cost, 600000, computational cost 1047
== codec_g722.so => (ITU G.722-64kbps G722 Transcoder)
Loading func_callerid.so.
== Registered custom function ‘CALLERID’
== Registered custom function ‘CONNECTEDLINE’
== Registered custom function ‘REDIRECTING’
== func_callerid.so => (Party ID related dialplan functions (Caller-ID, Connected-line, Redirecting))
Loading func_cdr.so.
== Registered custom function ‘CDR’
== Registered custom function ‘CDR_PROP’
== func_cdr.so => (Call Detail Record (CDR) dialplan functions)
Loading func_sorcery.so.
== Registered custom function ‘AST_SORCERY’
== func_sorcery.so => (Get a field from a sorcery object)
Loading func_strings.so.
== Registered custom function ‘FIELDQTY’
== Registered custom function ‘FIELDNUM’
== Registered custom function ‘FILTER’
== Registered custom function ‘REPLACE’
== Registered custom function ‘STRREPLACE’
== Registered custom function ‘STRBETWEEN’
== Registered custom function ‘LISTFILTER’
== Registered custom function ‘REGEX’
== Registered custom function ‘ARRAY’
== Registered custom function ‘QUOTE’
== Registered custom function ‘CSV_QUOTE’
== Registered custom function ‘LEN’
== Registered custom function ‘STRFTIME’
== Registered custom function ‘STRPTIME’
== Registered custom function ‘EVAL’
== Registered custom function ‘KEYPADHASH’
== Registered custom function ‘HASHKEYS’
== Registered custom function ‘HASH’
== Registered application ‘ClearHash’
== Registered custom function ‘TOUPPER’
== Registered custom function ‘TOLOWER’
== Registered custom function ‘SHIFT’
== Registered custom function ‘POP’
== Registered custom function ‘PUSH’
== Registered custom function ‘UNSHIFT’
== Registered custom function ‘PASSTHRU’
== Registered custom function ‘TRIM’
== Registered custom function ‘LTRIM’
== Registered custom function ‘RTRIM’
== func_strings.so => (String handling dialplan functions)
Loading pbx_config.so.
== Setting global variable ‘INTERNAL_DIAL_OPT’ to ‘,30’
– Time to scan old dialplan and merge leftovers back into the new: 0.000002 sec
– Time to restore hints and swap in new dialplan: 0.000009 sec
– Time to delete the old dialplan: 0.000001 sec
– Total time merge_contexts_delete: 0.000012 sec
– pbx_config successfully loaded 0 contexts (enable debug for details).
== Manager registered action DialplanExtensionAdd
== Manager registered action DialplanExtensionRemove
== pbx_config.so => (Text Extension Configuration)
Loading func_pjsip_endpoint.so.
== Registered custom function ‘PJSIP_ENDPOINT’
== func_pjsip_endpoint.so => (Get information about a PJSIP endpoint)
Loading res_pjsip_endpoint_identifier_anonymous.so.
== res_pjsip_endpoint_identifier_anonymous.so => (PJSIP Anonymous endpoint identifier)
Loading app_queue.so.
[Oct 31 09:20:38] NOTICE[20669]: app_queue.c:9525 reload_queue_rules: No queuerules.conf file found, queues will not follow penalty rules
== Registered application ‘Queue’
== Registered application ‘AddQueueMember’
== Registered application ‘RemoveQueueMember’
== Registered application ‘PauseQueueMember’
== Registered application ‘UnpauseQueueMember’
== Registered application ‘QueueLog’
== Registered application ‘QueueUpdate’
== Manager registered action QueueStatus
== Manager registered action QueueSummary
== Manager registered action QueueAdd
== Manager registered action QueueRemove
== Manager registered action QueuePause
== Manager registered action QueueLog
== Manager registered action QueuePenalty
== Manager registered action QueueMemberRingInUse
== Manager registered action QueueRule
== Manager registered action QueueReload
== Manager registered action QueueReset
== Manager registered action QueueChangePriorityCaller
== Manager registered action QueueWithdrawCaller
== Registered custom function ‘QUEUE_VARIABLES’
== Registered custom function ‘QUEUE_EXISTS’
== Registered custom function ‘QUEUE_MEMBER’
== Registered custom function ‘QUEUE_MEMBER_COUNT’
== Registered custom function ‘QUEUE_MEMBER_LIST’
== Registered custom function ‘QUEUE_GET_CHANNEL’
== Registered custom function ‘QUEUE_WAITING_COUNT’
== Registered custom function ‘QUEUE_MEMBER_PENALTY’
== app_queue.so => (True Call Queueing)
Asterisk Ready.
*CLI>
Press Ctrl +C to exit the console. If the Asterisk is running in foreground mode then it will stop the Asterisk process.