How can I do some managing works such as createsuperuser ,makemigrations, migrate ect in OpenShift-NextGen for a Django Application ? (Step-by-Step)
In OpenShift-V2, I did the same by login to shell by rhc ssh app_name and run the command python $OPENSHIFT_REPO_DIR/wsgi/myproject/manage.py createsuperuser (Reference)
Method 1
Step 1: Login to OpenShift-V3 using
oc loginStep 2: Select your project using
oc project <project_name>Step 3: List your all pods using
oc get podsIt would be something like this,
Step 4: Find out the name which is at Running state.
Step 5: Run the command,
oc rsh <Name_of_the_pod_at_running_state>In my case it is,
oc rsh django-example-6-i0omnStep 6: Then, run
python manage.py createsuperuserto create super userMethod 2
Step 1:Login to your OpenShift-v3 using Web-Console
Step 2:Go to
DashboardStep 3:Select pods by
Application -> PodsStep 4:Choose the pod which is at running state
Step 5:Choose
TerminaltabStep 6:Then, run
python manage.py createsuperuserto create super userHope, It will work for you :)