How to deploy freqtrade on Azure Container Instances - azure

I want to deploy freqtrade on Azure Container Instances
What I did:
Azure Storage account
I created one "Storage account" with name "csb100320024b4ab12f".
Created one "File shares" with name "home"
Created a directory with name "user_data" and placed the configuration file there (config.json - the file for freqtrade)
Deploy container and mount volume - YAML
I created the following YAML file with name "docker-compose2.yml"
apiVersion: '2022-09-01'
location: West Europe
name: test10
properties:
containers:
- name: containerstest10
properties:
environmentVariables: []
image: freqtradeorg/freqtrade:stable
ports:
- port: 80
resources:
requests:
cpu: 1.0
memoryInGB: 1.5
volumeMounts:
- mountPath: /home/user_data
name: home
osType: Linux
restartPolicy: OnFailure
ipAddress:
type: Public
ports:
- port: 80
dnsNameLabel: test10-test
volumes:
- name: home
azureFile:
sharename: home
storageAccountName: csb100320024b4ab12f
storageAccountKey: ***
tags: {}
type: Microsoft.ContainerInstance/freqtrade
3) Created a container using the Azure CLI
az container create --resource-group freqtrade --file docker-compose2.yml
As a result, I received this message
{
"extendedLocation": null,
"id": "/subscriptions/053eaf81-0ddb-4f40-bf4a-89259fc75ec3/resourceGroups/freqtrade/providers/Microsoft.ContainerInstance/containerGroups/test10",
"identity": null,
"kind": null,
"location": "West Europe",
"managedBy": null,
"name": "test10",
"plan": null,
"properties": {
"containers": [
{
"name": "containerstest10",
"properties": {
"environmentVariables": [],
"image": "freqtradeorg/freqtrade:stable",
"instanceView": {
"currentState": {
"detailStatus": "Completed",
"exitCode": 0,
"finishTime": "2022-12-16T11:47:15.349Z",
"startTime": "2022-12-16T11:47:04.299Z",
"state": "Terminated"
},
"events": [
{
"count": 1,
"firstTimestamp": "2022-12-16T11:46:16Z",
"lastTimestamp": "2022-12-16T11:46:16Z",
"message": "pulling image \"freqtradeorg/freqtrade#sha256:8fce42919108433c1ea5920c363b6b6877f52b0756ffcd23f13360402adfc8b9\"",
"name": "Pulling",
"type": "Normal"
},
{
"count": 1,
"firstTimestamp": "2022-12-16T11:46:47Z",
"lastTimestamp": "2022-12-16T11:46:47Z",
"message": "Successfully pulled image \"freqtradeorg/freqtrade#sha256:8fce42919108433c1ea5920c363b6b6877f52b0756ffcd23f13360402adfc8b9\"",
"name": "Pulled",
"type": "Normal"
},
{
"count": 1,
"firstTimestamp": "2022-12-16T11:47:04Z",
"lastTimestamp": "2022-12-16T11:47:04Z",
"message": "Started container",
"name": "Started",
"type": "Normal"
}
],
"restartCount": 0
},
"ports": [
{
"port": 80
}
],
"resources": {
"requests": {
"cpu": 1.0,
"memoryInGB": 1.5
}
},
"volumeMounts": [
{
"mountPath": "/home/user_data",
"name": "home"
}
]
}
}
],
"initContainers": [],
"instanceView": {
"events": [
{
"count": 1,
"firstTimestamp": "2022-12-16T11:47:03.306Z",
"lastTimestamp": "2022-12-16T11:47:03.306Z",
"message": "Successfully mounted Azure File Volume.",
"name": "SuccessfulMountAzureFileVolume",
"type": "Normal"
}
],
"state": "Succeeded"
},
"ipAddress": {
"autoGeneratedDomainNameLabelScope": "Unsecure",
"dnsNameLabel": "test10-test",
"fqdn": "test10-test.westeurope.azurecontainer.io",
"ports": [
{
"port": 80
}
],
"type": "Public"
},
"osType": "Linux",
"provisioningState": "Succeeded",
"restartPolicy": "OnFailure",
"sku": "Standard",
"volumes": [
{
"azureFile": {
"shareName": "home",
"storageAccountName": "csb100320024b4ab12f"
},
"name": "home"
}
]
},
"resourceGroup": "freqtrade",
"sku": null,
"tags": {},
"type": "Microsoft.ContainerInstance/containerGroups"
}
The error in logs:
2022-12-16 11:56:56,991 - freqtrade - INFO - freqtrade 2022.11
2022-12-16 11:56:57,615 - freqtrade.worker - INFO - Starting worker 2022.11
2022-12-16 11:56:57,616 - freqtrade.configuration.load_config - INFO - Using config: config.json ...
2022-12-16 11:56:57,616 - freqtrade.commands.trade_commands - ERROR - Config file "config.json" not found! Please create a config file or check whether it exists.
2022-12-16 11:56:57,617 - freqtrade.commands.trade_commands - ERROR - Fatal exception!
Traceback (most recent call last):
File "/freqtrade/freqtrade/configuration/load_config.py", line 61, in load_config_file
with open(path) if path != '-' else sys.stdin as file:
FileNotFoundError: [Errno 2] No such file or directory: 'config.json'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/freqtrade/freqtrade/commands/trade_commands.py", line 18, in start_trading
worker = Worker(args)
File "/freqtrade/freqtrade/worker.py", line 37, in __init__
self._init(False)
File "/freqtrade/freqtrade/worker.py", line 50, in _init
self._config = Configuration(self._args, None).get_config()
File "/freqtrade/freqtrade/configuration/configuration.py", line 42, in get_config
self.config = self.load_config()
File "/freqtrade/freqtrade/configuration/configuration.py", line 68, in load_config
config: Config = load_from_files(self.args.get("config", []))
File "/freqtrade/freqtrade/configuration/load_config.py", line 101, in load_from_files
config_tmp = load_config_file(str(file))
File "/freqtrade/freqtrade/configuration/load_config.py", line 64, in load_config_file
raise OperationalException(
freqtrade.exceptions.OperationalException: Config file "config.json" not found! Please create a config file or check whether it exists.
Why is the error occurring? Why can't find the "config.json" file? Please help me to deploy freqtrade on Azure Container Instances

Related

Filebeat Demonset error while deploying on Azure Kubernetes services

I am trying to deploy Filebeat demonset on Azure Kubernetes services
I have grabbed my code from : https://github.com/elastic/beats/tree/master/deploy/kubernetes/filebeat
Below is the error i am facing, Kindly let me know if am missing something here
Error:
{
"kind": "Event",
"apiVersion": "v1",
"metadata": {
"name": "filebeat.1686897c8d8bxxxx",
"namespace": "kube-system",
"selfLink": "/api/v1/namespaces/kube-system/events/filebeat.1686897c8d8bxxxx",
"uid": "5b94cf20-b432-4d77-b20b-f45fd91xxxxx",
"resourceVersion": "708810xx",
"creationTimestamp": "2021-06-08T07:04:43Z",
"managedFields": [
{
"manager": "kube-controller-manager",
"operation": "Update",
"apiVersion": "v1",
"time": "2021-06-08T07:04:45Z",
"fieldsType": "FieldsV1",
"fieldsV1": {
"f:count": {},
"f:firstTimestamp": {},
"f:involvedObject": {
"f:apiVersion": {},
"f:kind": {},
"f:name": {},
"f:namespace": {},
"f:resourceVersion": {},
"f:uid": {}
},
"f:lastTimestamp": {},
"f:message": {},
"f:reason": {},
"f:source": {
"f:component": {}
},
"f:type": {}
}
}
]
},
"involvedObject": {
"kind": "DaemonSet",
"namespace": "kube-system",
"name": "filebeat",
"uid": "80f770e5-2b8b-xxxx-bcea-2c2dfba5xxxx",
"apiVersion": "apps/v1",
"resourceVersion": "7088xxxx"
},
"reason": "FailedCreate",
"message": "Error creating: pods \"filebeat-\" is forbidden: error looking up service account kube-system/filebeat: serviceaccount \"filebeat\" not found",
"source": {
"component": "daemonset-controller"
},
"firstTimestamp": "2021-06-08T07:04:43Z",
"lastTimestamp": "2021-06-08T07:04:45Z",
"count": 9,
"type": "Warning",
"eventTime": null,
"reportingComponent": "",
"reportingInstance": ""
}
Kubernetes is failing to create your pod because it references a Service Account that does not exist.
Please ensure to apply all the yaml files in the page you mentioned:
https://github.com/elastic/beats/tree/master/deploy/kubernetes/filebeat
As a basic example:
kubectl apply -f filebeat-configmap.yaml
kubectl apply -f filebeat-daemonset.yaml
kubectl apply -f filebeat-role-binding.yaml
kubectl apply -f filebeat-role.yaml
kubectl apply -f filebeat-service-account.yaml
According to the YAML files in the link that you provided, it seems the daemonset in the YAML file filebeat-daemonset.yaml depends on the service account filebeat. So you need to deploy the service account filebeat before you deploy the daemonset:

Azure Logic App, deployed using DevOps, first step "When a HTTP request is received", how to get the URL as output variable

Long title: Azure Logic App, deployed using DevOps, first step "When a HTTP request is received", how to get the URL as output variable for use in deployment of App Service calling this Logic App?
My azure application is composed of two parts:
a Logic App
an App Service (web)
which are both deployed using DevOps.
The first step of the logic app is "When a HTTP request is received".
The web has a dependency on the generated url
(e.g. https://prod-23.usgovarizona.logic.azure.us:443/workflows/.../triggers/request/paths/invoke?api-version=2016-10-01&sp=%2Ftriggers%2Frequest%2Frun&sv=1.0&sig=...) of the logic app.
How do I get the URL of the logic apps' first step as an output variable,
so that I can supply that value in the deployment of the App Service,
which calls the Logic App?
I looked at https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/template-outputs?tabs=azure-powershell but that didn't help me.
release.json
{
"source": 2,
"revision": 59,
"description": null,
"lastRelease": {
"id": 853,
"name": "Release-37",
"artifacts": [],
"_links": {},
"description": "Triggered by SMS Scheduler 2020.206.01.",
"releaseDefinition": {
"id": 14,
"projectReference": null,
"_links": {}
},
},
"variables": {
"depr_AppTeam": {
"value": "SDIS"
},
"depr_DeptAbbr": {
"value": "ENT"
},
"depr_ResourceGroupName": {
"value": "$AppTeam+ \"-\"+ $AppName +\"-\"+$Env + \"-rg\""
}
},
"variableGroups": [
43
],
"environments": [
{
"id": 24,
"name": "DEV",
"rank": 1,
"variables": {},
"variableGroups": [],
"deployStep": {
"id": 90
},
"deployPhases": [
{
"deploymentInput": {
"parallelExecution": {
"parallelExecutionType": 0
},
"agentSpecification": {
"identifier": "vs2017-win2016"
},
"skipArtifactsDownload": false,
"artifactsDownloadInput": {
"downloadInputs": []
},
"queueId": 64,
"demands": [],
"enableAccessToken": false,
"timeoutInMinutes": 0,
"jobCancelTimeoutInMinutes": 1,
"condition": "succeeded()",
"overrideInputs": {}
},
"rank": 1,
"phaseType": 1,
"name": "Agent job",
"refName": null,
"workflowTasks": [
{
"environment": {},
"taskId": "94a...",
"version": "2.*",
"name": "Azure Deployment:Create Or Update Resource Group action on $(AppTeam)-$(AppName)-$(Release.EnvironmentName)-rg",
"refName": "",
"enabled": true,
"alwaysRun": false,
"continueOnError": false,
"timeoutInMinutes": 0,
"definitionType": "task",
"overrideInputs": {},
"condition": "succeeded()",
"inputs": {
"ConnectedServiceName": "nov...",
"action": "Create Or Update Resource Group",
"resourceGroupName": "$(AppTeam)-$(AppName)-$(Release.EnvironmentName)-rg",
"location": "USGov Arizona",
"templateLocation": "Linked artifact",
"csmFileLink": "",
"csmParametersFileLink": "",
"csmFile": "$(System.DefaultWorkingDirectory)/_ent_sms_scheduler/Job1/template.json",
"csmParametersFile": "$(System.DefaultWorkingDirectory)/_ent_sms_scheduler/Job1/parameters.json",
"overrideParameters": "",
"deploymentMode": "Incremental",
"enableDeploymentPrerequisites": "None",
"deploymentGroupEndpoint": "",
"project": "",
"deploymentGroupName": "",
"copyAzureVMTags": "true",
"runAgentServiceAsUser": "false",
"userName": "",
"password": "",
"outputVariable": "",
"deploymentName": "",
"deploymentOutputs": "",
"addSpnToEnvironment": "false"
}
},
]
}
],
},
],
"triggers": [
{
"artifactAlias": "_ent_sms_scheduler",
"triggerConditions": [],
"triggerType": 1
}
],
"releaseNameFormat": "Release-$(rev:r)",
"tags": [],
"properties": {
"DefinitionCreationSource": {
"$type": "System.String",
"$value": "ReleaseNew"
},
"IntegrateJiraWorkItems": {
"$type": "System.String",
"$value": "false"
},
"IntegrateBoardsWorkItems": {
"$type": "System.String",
"$value": "False"
}
},
"id": 14,
"name": "SMS SCHEDULER",
"path": "\\",
"projectReference": null,
"url": "https://vsrm.dev.azure.com/.../.../_apis/Release/definitions/14",
"_links": {
"self": {
"href": "https://vsrm.dev.azure.com/.../.../_apis/Release/definitions/14"
},
"web": {
"href": "https://dev.azure.com/.../.../_release?definitionId=14"
}
}
}
release task:
steps:
- task: AzureResourceGroupDeployment#2
displayName: 'Azure Deployment:Create Or Update Resource Group action on $(AppTeam)-$(AppName)-$(Release.EnvironmentName)-rg'
inputs:
azureSubscription: 'ENT-eComm-Deployment-NonProd-Gov-Connection'
resourceGroupName: '$(AppTeam)-$(AppName)-$(Release.EnvironmentName)-rg'
location: 'USGov Arizona'
csmFile: '$(System.DefaultWorkingDirectory)/_ent_sms_scheduler/Job1/template.json'
csmParametersFile: '$(System.DefaultWorkingDirectory)/_ent_sms_scheduler/Job1/parameters.json'
It seems that you deploy Azure Logic App first, and then App Service.
You can add an Azure Powershell task after you deploy the Azure Logic app. Call Get-AzLogicAppTriggerCallbackUrl
command to get specific Logic App trigger callback URL. Example:
Get-AzLogicAppTriggerCallbackUrl -ResourceGroupName "ResourceGroup11" -Name "LogicApp1" -TriggerName "manual"
Value
-----
https://prod-03.westus.logic.azure.com:443/workflows/c4ed9335bc864140a11f4508d19acea3/triggers/manual/run?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=
And then you can define variables whose value is the response URL. Follow use variables as inputs and detailed sample to output this variable to following tasks.

Add volumes and files to a container in Azure using Pulumi

I'm starting to use Pulumi for container deployment in Azure cloud.
At the moment I am facing problems because I need to load some configuration files to a container of Traefik but I cannot find the correct way. The idea is that Traefik works as a reverse proxy for the other containers in the group.
My problem is that no matter how much I specify the creation of a volume and try to connect it to the container, when I go to the Azure dashboard, it appears that the container does not have any connected volume.
import pulumi
import pulumi_azure_nextgen as azure
data_rg = azure.resources.latest.ResourceGroup(
"data-rg",
resource_group_name="data-rg",
location="West Europe")
datahike_group = azure.containerinstance.latest.ContainerGroup(
"data-group",
location="West Europe",
container_group_name="data-cg",
resource_group_name=data_rg.name,
containers=[{
"name":"data",
"image": "wordpress:latest",
"resources": {
"requests": { "cpu": 0.5, "memory_in_gb": 1.5}
},
},
{
"name": "proxy",
"image": "traefik:latest",
"resources": {
"requests": { "cpu": 0.5, "memory_in_gb": 1.5}
},
"ports": [{
"port": 80,
"protocol": "TCP",
}],
"VolumeMount": [{
"mount_path": "/etc/traefik/config_base.yml",
"name": "traefik-volume",
}],
"environment_variables": [{
"name": "TRAEFIK_CONFIG_FILE",
"value": "file"
},{
"name": "TRAEFIK_CONFIG_PATH",
"value": "/etc/traefik/config_base.yml"
}
],
},
],
ip_address={
"dnsNameLabel": "dnsnamelabel1",
"ports": [{
"port": 80,
"protocol": "TCP",
}],
"type": "Public",
},
volumes=[
{
"emptyDir": {},
"name": "datahike-volume",
},
{
"name": "traefik-volume",
"secret": {
"secretKey1": "SecretValue1InBase64",
},
},
],
os_type="Linux",
tags={
"environment": "testing",
})
pulumi.export("data_ip", data_group.ip_address)
Does anyone know why its failing?
in this case, the error was due to a typo:
"volumeMounts": [{
"mount_path": "/etc/traefik/config_base.yml",
"name": "traefik-volume",
}],

Getting facts from an Azure VM with Ansible with Azure

I'm trying to have a single playbook that will create a VM in Azure and also run a playbook on it once it is created.
I can get the VM to be created but as the Public IP doesn't exist before it is created I can't use for the inventory. This is my current yaml:
---
- hosts: localhost
tasks:
- name: Create virtual network
azure_rm_virtualnetwork:
resource_group: az-test
name: az-test-vnet
address_prefixes: "10.43.0.0/16"
- name: Add subnet
azure_rm_subnet:
resource_group: az-test
name: az-test-subnet
address_prefix: "10.43.0.0/24"
virtual_network: az-test-vnet
- name: Create VM
azure_rm_virtualmachine:
resource_group: az-test
name: az-test-vm
vm_size: Standard_DS1_v2
admin_username: az-test
ssh_password_enabled: false
ssh_public_keys:
- path: /home/az-test/.ssh/authorized_keys
key_data: "ssh-rsa xxxx "
image:
offer: CentOS
publisher: OpenLogic
sku: '7.4'
version: latest
#- name: Get facts for all Public IPs within a resource groups
# azure_rm_publicip_facts:
# resource_group: az-test
The last bit there's an Ansible Azure module that should return all public IPs in the resource group but that fails.
Even if I could dynamically retrive the Public IP address, could the playbook even be run on it as ansible-playbook was initially only run on 'localhost' and the Public IP is not in the inventory?
Using latest of everything:
ansible 2.4.3.0
python 2.7
azure-cli-core-2.0.31
Apologies for the messy YAML formatting..
EDIT:
Can see Ansible is gathering facts that I can use but not exactly sure how to reference them?
"ansible_facts": {
"azure_vm": {
"id": "/subscriptions/x/resourceGroups/az-test/providers/Microsoft.Compute/virtualMachines/az-test",
"location": "eastus",
"name": "az-test",
"powerstate": "running",
"properties": {
"hardwareProfile": {
"vmSize": "Standard_DS1_v2"
},
"instanceView": {
"disks": [
{
"name": "az-test.vhd",
"statuses": [
{
"code": "ProvisioningState/succeeded",
"displayStatus": "Provisioning succeeded",
"level": "Info",
"time": "2018-04-16Tx"
}
]
}
],
"extensions": [
{
"name": "OmsAgentForLinux",
"statuses": [
{
"code": "ProvisioningState/succeeded",
"displayStatus": "Provisioning succeeded",
"level": "Info",
"message": "Enable succeeded"
}
],
"type": "Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux",
"typeHandlerVersion": "1.4.60.2"
}
],
"statuses": [
{
"code": "ProvisioningState/succeeded",
"displayStatus": "Provisioning succeeded",
"level": "Info",
"time": "2018-04-16Tx"
},
{
"code": "PowerState/running",
"displayStatus": "VM running",
"level": "Info"
}
],
"vmAgent": {
"extensionHandlers": [
{
"status": {
"code": "ProvisioningState/succeeded",
"displayStatus": "Ready",
"level": "Info",
"message": "Plugin enabled"
},
"type": "Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux",
"typeHandlerVersion": "1.4.60.2"
}
],
"statuses": [
{
"code": "ProvisioningState/succeeded",
"displayStatus": "Ready",
"level": "Info",
"message": "Guest Agent is running",
"time": "2018-04-16Tx"
}
],
"vmAgentVersion": "2.2.25"
}
},
"networkProfile": {
"networkInterfaces": [
{
"id": "/subscriptions/x/resourceGroups/az-test/providers/Microsoft.Network/networkInterfaces/az-test01",
"name": "az-test01",
"properties": {
"dnsSettings": {
"appliedDnsServers": [],
"dnsServers": [],
"internalDomainNameSuffix": "x.bx.internal.cloudapp.net"
},
"enableAcceleratedNetworking": false,
"enableIPForwarding": false,
"ipConfigurations": [
{
"etag": "W/\"x\"",
"id": "/subscriptions/x/resourceGroups/az-test/providers/Microsoft.Network/networkInterfaces/az-test01/ipConfigurations/default",
"name": "default",
"properties": {
"primary": true,
"privateIPAddress": "10.43.0.5",
"privateIPAddressVersion": "IPv4",
"privateIPAllocationMethod": "Dynamic",
"provisioningState": "Succeeded",
"publicIPAddress": {
"id": "/subscriptions/x/resourceGroups/az-test/providers/Microsoft.Network/publicIPAddresses/az-test01",
"name": "az-test01",
"properties": {
"idleTimeoutInMinutes": 4,
"ipAddress": "52.x.x.x",
"ipConfiguration": {
"id": "/subscriptions/x/resourceGroups/az-test/providers/Microsoft.Network/networkInterfaces/az-test01/ipConfigurations/default"
},
"provisioningState": "Succeeded",
"publicIPAddressVersion": "IPv4",
"publicIPAllocationMethod": "Static",
"resourceGuid": "x"
}
},
"subnet": {
"id": "/subscriptions/x/resourceGroups/az-test/providers/Microsoft.Network/virtualNetworks/az-test-vnet/subnets/az-test-subnet"
}
}
}
],
"macAddress": "00-0D-3A-1D-E1-8A",
"networkSecurityGroup": {
"id": "/subscriptions/x/resourceGroups/az-test/providers/Microsoft.Network/networkSecurityGroups/az-test01"
},
"primary": true,
"provisioningState": "Succeeded",
"resourceGuid": "x",
"virtualMachine": {
"id": "/subscriptions/x/resourceGroups/az-test/providers/Microsoft.Compute/virtualMachines/az-test"
}
}
}
]
},
"osProfile": {
"adminUsername": "az-test",
"computerName": "az-test",
"linuxConfiguration": {
"disablePasswordAuthentication": true,
"ssh": {
"publicKeys": [
{
"keyData": "ssh-rsa AAx ",
"path": "/home/az-test/.ssh/authorized_keys"
}
]
}
},
"secrets": []
},
"provisioningState": "Succeeded",
"storageProfile": {
"dataDisks": [],
"imageReference": {
"offer": "CentOS",
"publisher": "OpenLogic",
"sku": "7.4",
"version": "7.4.20180118"
},
"osDisk": {
"caching": "ReadOnly",
"createOption": "fromImage",
"diskSizeGB": 30,
"name": "az-test.vhd",
"osType": "Linux",
"vhd": {
"uri": "https://x.blob.core.windows.net/vhds/az-test.vhd"
}
}
},
"vmId": "x"
},
"resources": [
{
"id": "/subscriptions/x/resourceGroups/az-test/providers/Microsoft.Compute/virtualMachines/az-test/extensions/OmsAgentForLinux",
"location": "eastus",
"name": "OmsAgentForLinux",
"properties": {
"autoUpgradeMinorVersion": true,
"provisioningState": "Succeeded",
"publisher": "Microsoft.EnterpriseCloud.Monitoring",
"settings": {
"azureResourceId": "/subscriptions/x/resourcegroups/az-test/providers/microsoft.compute/virtualmachines/az-test",
"stopOnMultipleConnections": true,
"workspaceId": "x"
},
"type": "OmsAgentForLinux",
"typeHandlerVersion": "1.0"
},
"type": "Microsoft.Compute/virtualMachines/extensions"
}
],
"tags": {},
"type": "Microsoft.Compute/virtualMachines"
}
}
The module name should be azure_rm_publicipaddress_facts instead of azure_rm_publicip_facts

Unable to start a ubuntu container in openshift-origin

Am trying to bring up a ubuntu container in a POD in openshift. I have setup my local docker registry and have configured DNS accordingly. Starting the ubuntu container with just docker works fine without any issues. When I deploy the POD, I can see that my docker ubuntu image is pulled successfully, but doesnt succeed in starting the same. It fails with back-off pulling image error. Is this because my entry point does not have any background process running in side the container ?
"openshift.io/container.ubuntu.image.entrypoint": "[\"top\"]",
Snapshot of the events
Deployment-config :
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "ubuntu",
"namespace": "testproject",
"selfLink": "/oapi/v1/namespaces/testproject/deploymentconfigs/ubuntu",
"uid": "e7c7b9c6-4dbd-11e6-bd2b-0800277bbed5",
"resourceVersion": "4340",
"generation": 6,
"creationTimestamp": "2016-07-19T14:34:31Z",
"labels": {
"app": "ubuntu"
},
"annotations": {
"openshift.io/deployment.cancelled": "4",
"openshift.io/generated-by": "OpenShiftNewApp"
}
},
"spec": {
"strategy": {
"type": "Rolling",
"rollingParams": {
"updatePeriodSeconds": 1,
"intervalSeconds": 1,
"timeoutSeconds": 600,
"maxUnavailable": "25%",
"maxSurge": "25%"
},
"resources": {}
},
"triggers": [
{
"type": "ConfigChange"
},
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"ubuntu"
],
"from": {
"kind": "ImageStreamTag",
"namespace": "testproject",
"name": "ubuntu:latest"
},
"lastTriggeredImage": "ns1.myregistry.com:5000/ubuntu#sha256:6d9a2a1bacdcb2bd65e36b8f1f557e89abf0f5f987ba68104bcfc76103a08b86"
}
}
],
"replicas": 1,
"test": false,
"selector": {
"app": "ubuntu",
"deploymentconfig": "ubuntu"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"app": "ubuntu",
"deploymentconfig": "ubuntu"
},
"annotations": {
"openshift.io/container.ubuntu.image.entrypoint": "[\"top\"]",
"openshift.io/generated-by": "OpenShiftNewApp"
}
},
"spec": {
"containers": [
{
"name": "ubuntu",
"image": "ns1.myregistry.com:5000/ubuntu#sha256:6d9a2a1bacdcb2bd65e36b8f1f557e89abf0f5f987ba68104bcfc76103a08b86",
"resources": {},
"terminationMessagePath": "/dev/termination-log",
"imagePullPolicy": "Always"
}
],
"restartPolicy": "Always",
"terminationGracePeriodSeconds": 30,
"dnsPolicy": "ClusterFirst",
"securityContext": {}
}
}
},
"status": {
"latestVersion": 5,
"details": {
"causes": [
{
"type": "ConfigChange"
}
]
},
"observedGeneration": 5
}
The problem was with the http proxy. After solving that image pull was successful

Resources